// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
using Pulumi;

namespace PiersKarsenbarg.Codefresh
{
    /// <summary>
    /// ## # Account Admins resource
    /// 
    /// Use this resource to set a list of admins for any account.
    /// 
    /// ## Example Usage
    /// ### Example 2
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Codefresh = PiersKarsenbarg.Codefresh;
    /// using Codefresh = Pulumi.Codefresh;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var testAccount = new Codefresh.Account("testAccount", new()
    ///     {
    ///         Limits = new[]
    ///         {
    ///             new Codefresh.Inputs.AccountLimitArgs
    ///             {
    ///                 Collaborators = 25,
    ///                 DataRetentionWeeks = 5,
    ///             },
    ///         },
    ///         Builds = new[]
    ///         {
    ///             new Codefresh.Inputs.AccountBuildArgs
    ///             {
    ///                 Parallel = 2,
    ///             },
    ///         },
    ///     });
    /// 
    ///     var admin = Codefresh.GetUser.Invoke(new()
    ///     {
    ///         Email = "&lt;EXISTING USER EMAIL&gt;",
    ///     });
    /// 
    ///     var testAccountAdmins = new Codefresh.AccountAdmins("testAccountAdmins", new()
    ///     {
    ///         AccountId = testAccount.Id,
    ///         Users = new[]
    ///         {
    ///             admin.Apply(getUserResult =&gt; getUserResult.UserId),
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ```sh
    ///  $ pulumi import codefresh:index/accountAdmins:AccountAdmins test xxxxxxxxxxxxxxxxxxx
    /// ```
    /// </summary>
    [CodefreshResourceType("codefresh:index/accountAdmins:AccountAdmins")]
    public partial class AccountAdmins : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The account id where to set up a list of admins.
        /// </summary>
        [Output("accountId")]
        public Output<string> AccountId { get; private set; } = null!;

        /// <summary>
        /// A list of users to set up as account admins.
        /// </summary>
        [Output("users")]
        public Output<ImmutableArray<string>> Users { get; private set; } = null!;


        /// <summary>
        /// Create a AccountAdmins resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public AccountAdmins(string name, AccountAdminsArgs args, CustomResourceOptions? options = null)
            : base("codefresh:index/accountAdmins:AccountAdmins", name, args ?? new AccountAdminsArgs(), MakeResourceOptions(options, ""))
        {
        }

        private AccountAdmins(string name, Input<string> id, AccountAdminsState? state = null, CustomResourceOptions? options = null)
            : base("codefresh:index/accountAdmins:AccountAdmins", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing AccountAdmins resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static AccountAdmins Get(string name, Input<string> id, AccountAdminsState? state = null, CustomResourceOptions? options = null)
        {
            return new AccountAdmins(name, id, state, options);
        }
    }

    public sealed class AccountAdminsArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The account id where to set up a list of admins.
        /// </summary>
        [Input("accountId", required: true)]
        public Input<string> AccountId { get; set; } = null!;

        [Input("users", required: true)]
        private InputList<string>? _users;

        /// <summary>
        /// A list of users to set up as account admins.
        /// </summary>
        public InputList<string> Users
        {
            get => _users ?? (_users = new InputList<string>());
            set => _users = value;
        }

        public AccountAdminsArgs()
        {
        }
        public static new AccountAdminsArgs Empty => new AccountAdminsArgs();
    }

    public sealed class AccountAdminsState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The account id where to set up a list of admins.
        /// </summary>
        [Input("accountId")]
        public Input<string>? AccountId { get; set; }

        [Input("users")]
        private InputList<string>? _users;

        /// <summary>
        /// A list of users to set up as account admins.
        /// </summary>
        public InputList<string> Users
        {
            get => _users ?? (_users = new InputList<string>());
            set => _users = value;
        }

        public AccountAdminsState()
        {
        }
        public static new AccountAdminsState Empty => new AccountAdminsState();
    }
}
