// *** 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
{
    public static class GetAccount
    {
        /// <summary>
        /// ## # account data module
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = PiersKarsenbarg.Codefresh;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var acc = Codefresh.GetAccount.Invoke(new()
        ///     {
        ///         Name = "acc1",
        ///     });
        /// 
        ///     var user1 = new Codefresh.User("user1", new()
        ///     {
        ///         Email = "kenaa@example.com",
        ///         UserName = "user1",
        ///         Accounts = new[]
        ///         {
        ///             acc.Apply(getAccountResult =&gt; getAccountResult.Id),
        ///         },
        ///         Activate = true,
        ///         Roles = new[]
        ///         {
        ///             "Admin",
        ///             "User",
        ///         },
        ///         Logins = new[]
        ///         {
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = data.Codefresh_idps.Idp_azure.Id,
        ///                 Sso = true,
        ///             },
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = data.Codefresh_idps.Local.Id,
        ///             },
        ///         },
        ///         Personal = new Codefresh.Inputs.UserPersonalArgs
        ///         {
        ///             FirstName = "John",
        ///             LastName = "Smith",
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Task<GetAccountResult> InvokeAsync(GetAccountArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetAccountResult>("codefresh:index/getAccount:getAccount", args ?? new GetAccountArgs(), options.WithDefaults());

        /// <summary>
        /// ## # account data module
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = PiersKarsenbarg.Codefresh;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var acc = Codefresh.GetAccount.Invoke(new()
        ///     {
        ///         Name = "acc1",
        ///     });
        /// 
        ///     var user1 = new Codefresh.User("user1", new()
        ///     {
        ///         Email = "kenaa@example.com",
        ///         UserName = "user1",
        ///         Accounts = new[]
        ///         {
        ///             acc.Apply(getAccountResult =&gt; getAccountResult.Id),
        ///         },
        ///         Activate = true,
        ///         Roles = new[]
        ///         {
        ///             "Admin",
        ///             "User",
        ///         },
        ///         Logins = new[]
        ///         {
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = data.Codefresh_idps.Idp_azure.Id,
        ///                 Sso = true,
        ///             },
        ///             new Codefresh.Inputs.UserLoginArgs
        ///             {
        ///                 IdpId = data.Codefresh_idps.Local.Id,
        ///             },
        ///         },
        ///         Personal = new Codefresh.Inputs.UserPersonalArgs
        ///         {
        ///             FirstName = "John",
        ///             LastName = "Smith",
        ///         },
        ///     });
        /// 
        /// });
        /// ```
        /// </summary>
        public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetAccountResult>("codefresh:index/getAccount:getAccount", args ?? new GetAccountInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetAccountArgs : global::Pulumi.InvokeArgs
    {
        [Input("_id")]
        public string? _id { get; set; }

        [Input("admins")]
        private List<string>? _admins;
        public List<string> Admins
        {
            get => _admins ?? (_admins = new List<string>());
            set => _admins = value;
        }

        [Input("name")]
        public string? Name { get; set; }

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

    public sealed class GetAccountInvokeArgs : global::Pulumi.InvokeArgs
    {
        [Input("_id")]
        public Input<string>? _id { get; set; }

        [Input("admins")]
        private InputList<string>? _admins;
        public InputList<string> Admins
        {
            get => _admins ?? (_admins = new InputList<string>());
            set => _admins = value;
        }

        [Input("name")]
        public Input<string>? Name { get; set; }

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


    [OutputType]
    public sealed class GetAccountResult
    {
        public readonly string? _id;
        public readonly ImmutableArray<string> Admins;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? Name;

        [OutputConstructor]
        private GetAccountResult(
            string? _id,

            ImmutableArray<string> admins,

            string id,

            string? name)
        {
            this._id = _id;
            Admins = admins;
            Id = id;
            Name = name;
        }
    }
}
