<gh_stars>0// *** 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 GetCurrentAccount
    {
        /// <summary>
        /// ## # current_account data module
        /// 
        /// Return current account (owner of the token) and its users 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var acc = Codefresh.GetCurrentAccount.Invoke();
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["currentAc"] = acc.Apply(getCurrentAccountResult =&gt; getCurrentAccountResult),
        ///     };
        /// });
        /// ```
        /// 
        /// The output example: 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        /// });
        /// ```
        /// </summary>
        public static Task<GetCurrentAccountResult> InvokeAsync(GetCurrentAccountArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetCurrentAccountResult>("codefresh:index/getCurrentAccount:getCurrentAccount", args ?? new GetCurrentAccountArgs(), options.WithDefaults());

        /// <summary>
        /// ## # current_account data module
        /// 
        /// Return current account (owner of the token) and its users 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Codefresh = Pulumi.Codefresh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var acc = Codefresh.GetCurrentAccount.Invoke();
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["currentAc"] = acc.Apply(getCurrentAccountResult =&gt; getCurrentAccountResult),
        ///     };
        /// });
        /// ```
        /// 
        /// The output example: 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        /// });
        /// ```
        /// </summary>
        public static Output<GetCurrentAccountResult> Invoke(GetCurrentAccountInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetCurrentAccountResult>("codefresh:index/getCurrentAccount:getCurrentAccount", args ?? new GetCurrentAccountInvokeArgs(), options.WithDefaults());
    }


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

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

        [Input("users")]
        private List<Inputs.GetCurrentAccountUserArgs>? _users;
        public List<Inputs.GetCurrentAccountUserArgs> Users
        {
            get => _users ?? (_users = new List<Inputs.GetCurrentAccountUserArgs>());
            set => _users = value;
        }

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

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

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

        [Input("users")]
        private InputList<Inputs.GetCurrentAccountUserInputArgs>? _users;
        public InputList<Inputs.GetCurrentAccountUserInputArgs> Users
        {
            get => _users ?? (_users = new InputList<Inputs.GetCurrentAccountUserInputArgs>());
            set => _users = value;
        }

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


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

        [OutputConstructor]
        private GetCurrentAccountResult(
            string? _id,

            string id,

            string? name,

            ImmutableArray<Outputs.GetCurrentAccountUserResult> users)
        {
            this._id = _id;
            Id = id;
            Name = name;
            Users = users;
        }
    }
}
