<filename>sdk/dotnet/Catalog/SourceEntitlement.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 Pulumiverse.Vra.Catalog
{
    /// <summary>
    /// This resource provides a way to create a catalog source entitlement in VMware vRealize Automation.
    /// 
    /// ## Example Usage
    /// ### S
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Vra = Pulumiverse.Vra;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @this = new Vra.Catalog.SourceEntitlement("this", new()
    ///     {
    ///         CatalogSourceId = @var.Catalog_source_blueprint_id,
    ///         ProjectId = @var.Project_id,
    ///     });
    /// 
    /// });
    /// ```
    /// ## Attribute Reference
    /// 
    /// * `definition` - Represents a catalog source that is linked to a project via an entitlement.
    ///   
    ///     * `description` - Description of the catalog source.
    ///   
    ///     * `icon_id` - Icon id of associated catalog source.
    ///   
    ///     * `id` - Id of the catalog source.
    ///   
    ///     * `name` - Name of the catalog source.
    ///   
    ///     * `number_of_items` - Number of items in the associated catalog source.
    ///   
    ///     * `source_name` - Catalog source name.
    ///   
    ///     * `source_type` - Catalog source type.
    ///   
    ///     * `type` - Content definition type.
    /// 
    /// ## Import
    /// 
    /// Catalog source entitlement can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import vra:catalog/sourceEntitlement:SourceEntitlement this 05956583-6488-4e7d-84c9-92a7b7219a15`
    /// ```
    /// </summary>
    [VraResourceType("vra:catalog/sourceEntitlement:SourceEntitlement")]
    public partial class SourceEntitlement : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The id of the catalog source to create the entitlement.
        /// </summary>
        [Output("catalogSourceId")]
        public Output<string> CatalogSourceId { get; private set; } = null!;

        [Output("definitions")]
        public Output<ImmutableArray<Outputs.SourceEntitlementDefinition>> Definitions { get; private set; } = null!;

        /// <summary>
        /// The id of the project this entity belongs to.
        /// </summary>
        [Output("projectId")]
        public Output<string> ProjectId { get; private set; } = null!;


        /// <summary>
        /// Create a SourceEntitlement 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 SourceEntitlement(string name, SourceEntitlementArgs args, CustomResourceOptions? options = null)
            : base("vra:catalog/sourceEntitlement:SourceEntitlement", name, args ?? new SourceEntitlementArgs(), MakeResourceOptions(options, ""))
        {
        }

        private SourceEntitlement(string name, Input<string> id, SourceEntitlementState? state = null, CustomResourceOptions? options = null)
            : base("vra:catalog/sourceEntitlement:SourceEntitlement", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/pulumiverse",
            };
            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 SourceEntitlement 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 SourceEntitlement Get(string name, Input<string> id, SourceEntitlementState? state = null, CustomResourceOptions? options = null)
        {
            return new SourceEntitlement(name, id, state, options);
        }
    }

    public sealed class SourceEntitlementArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The id of the catalog source to create the entitlement.
        /// </summary>
        [Input("catalogSourceId", required: true)]
        public Input<string> CatalogSourceId { get; set; } = null!;

        /// <summary>
        /// The id of the project this entity belongs to.
        /// </summary>
        [Input("projectId", required: true)]
        public Input<string> ProjectId { get; set; } = null!;

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

    public sealed class SourceEntitlementState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The id of the catalog source to create the entitlement.
        /// </summary>
        [Input("catalogSourceId")]
        public Input<string>? CatalogSourceId { get; set; }

        [Input("definitions")]
        private InputList<Inputs.SourceEntitlementDefinitionGetArgs>? _definitions;
        public InputList<Inputs.SourceEntitlementDefinitionGetArgs> Definitions
        {
            get => _definitions ?? (_definitions = new InputList<Inputs.SourceEntitlementDefinitionGetArgs>());
            set => _definitions = value;
        }

        /// <summary>
        /// The id of the project this entity belongs to.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

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