<filename>sdk/dotnet/Ovh/Order/GetCart.cs// *** 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 Lbrlabs.PulumiPackage.Ovh.Order
{
    public static class GetCart
    {
        /// <summary>
        /// Use this data source to create a temporary order cart to retrieve information order cart products.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var mycart = Ovh.Order.GetCart.Invoke(new()
        ///     {
        ///         Description = "my cart",
        ///         OvhSubsidiary = "fr",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetCartResult> InvokeAsync(GetCartArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.InvokeAsync<GetCartResult>("ovh:Order/getCart:getCart", args ?? new GetCartArgs(), options.WithDefaults());

        /// <summary>
        /// Use this data source to create a temporary order cart to retrieve information order cart products.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using System.Linq;
        /// using Pulumi;
        /// using Ovh = Pulumi.Ovh;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var mycart = Ovh.Order.GetCart.Invoke(new()
        ///     {
        ///         Description = "my cart",
        ///         OvhSubsidiary = "fr",
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetCartResult> Invoke(GetCartInvokeArgs args, InvokeOptions? options = null)
            => global::Pulumi.Deployment.Instance.Invoke<GetCartResult>("ovh:Order/getCart:getCart", args ?? new GetCartInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetCartArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Assign a shopping cart to an loggedin client. Values can be `true` or `false`.
        /// </summary>
        [Input("assign")]
        public bool? Assign { get; set; }

        /// <summary>
        /// Description of your cart
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        /// <summary>
        /// Expiration time (format: 2006-01-02T15:04:05+00:00)
        /// </summary>
        [Input("expire")]
        public string? Expire { get; set; }

        /// <summary>
        /// OVHcloud Subsidiary
        /// </summary>
        [Input("ovhSubsidiary", required: true)]
        public string OvhSubsidiary { get; set; } = null!;

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

    public sealed class GetCartInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// Assign a shopping cart to an loggedin client. Values can be `true` or `false`.
        /// </summary>
        [Input("assign")]
        public Input<bool>? Assign { get; set; }

        /// <summary>
        /// Description of your cart
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Expiration time (format: 2006-01-02T15:04:05+00:00)
        /// </summary>
        [Input("expire")]
        public Input<string>? Expire { get; set; }

        /// <summary>
        /// OVHcloud Subsidiary
        /// </summary>
        [Input("ovhSubsidiary", required: true)]
        public Input<string> OvhSubsidiary { get; set; } = null!;

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


    [OutputType]
    public sealed class GetCartResult
    {
        public readonly bool? Assign;
        /// <summary>
        /// Cart identifier
        /// </summary>
        public readonly string CartId;
        public readonly string? Description;
        public readonly string Expire;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// Items of your cart
        /// </summary>
        public readonly ImmutableArray<int> Items;
        public readonly string OvhSubsidiary;
        /// <summary>
        /// Indicates if the cart has already been validated
        /// </summary>
        public readonly bool ReadOnly;

        [OutputConstructor]
        private GetCartResult(
            bool? assign,

            string cartId,

            string? description,

            string expire,

            string id,

            ImmutableArray<int> items,

            string ovhSubsidiary,

            bool readOnly)
        {
            Assign = assign;
            CartId = cartId;
            Description = description;
            Expire = expire;
            Id = id;
            Items = items;
            OvhSubsidiary = ovhSubsidiary;
            ReadOnly = readOnly;
        }
    }
}
