// *** 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;

namespace Pulumi.AliCloud.CloudStorageGateway
{
    public static class GetStocks
    {
        /// <summary>
        /// This data source provides the Cloud Storage Gateway Stocks of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.144.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CloudStorageGateway.GetStocks.Invoke(new()
        ///     {
        ///         GatewayClass = "Advanced",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zoneId"] = @default.Apply(getStocksResult =&gt; getStocksResult).Apply(@default =&gt; @default.Apply(getStocksResult =&gt; getStocksResult.Stocks[0]?.ZoneId)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetStocksResult> InvokeAsync(GetStocksArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetStocksResult>("alicloud:cloudstoragegateway/getStocks:getStocks", args ?? new GetStocksArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides the Cloud Storage Gateway Stocks of the current Alibaba Cloud user.
        /// 
        /// &gt; **NOTE:** Available in v1.144.0+.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.CloudStorageGateway.GetStocks.Invoke(new()
        ///     {
        ///         GatewayClass = "Advanced",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["zoneId"] = @default.Apply(getStocksResult =&gt; getStocksResult).Apply(@default =&gt; @default.Apply(getStocksResult =&gt; getStocksResult.Stocks[0]?.ZoneId)),
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetStocksResult> Invoke(GetStocksInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetStocksResult>("alicloud:cloudstoragegateway/getStocks:getStocks", args ?? new GetStocksInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetStocksArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The gateway class. Valid values: `Basic`, `Standard`,`Enhanced`,`Advanced`.
        /// </summary>
        [Input("gatewayClass")]
        public string? GatewayClass { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

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

    public sealed class GetStocksInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The gateway class. Valid values: `Basic`, `Standard`,`Enhanced`,`Advanced`.
        /// </summary>
        [Input("gatewayClass")]
        public Input<string>? GatewayClass { get; set; }

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

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


    [OutputType]
    public sealed class GetStocksResult
    {
        public readonly string? GatewayClass;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        public readonly string? OutputFile;
        public readonly ImmutableArray<Outputs.GetStocksStockResult> Stocks;

        [OutputConstructor]
        private GetStocksResult(
            string? gatewayClass,

            string id,

            string? outputFile,

            ImmutableArray<Outputs.GetStocksStockResult> stocks)
        {
            GatewayClass = gatewayClass;
            Id = id;
            OutputFile = outputFile;
            Stocks = stocks;
        }
    }
}
