// *** 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.Contentsource
{
    /// <summary>
    /// This resource provides a way to create a content source vRealize Automation(vRA).
    /// 
    /// ## Example Usage
    /// ### S
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Vra = Pulumiverse.Vra;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @this = new Vra.Contentsource.ContentSource("this", new()
    ///     {
    ///         ProjectId = @var.Project_id,
    ///         TypeId = "com.gitlab",
    ///         Description = "Some content Source",
    ///         SyncEnabled = false,
    ///         Config = new Vra.Contentsource.Inputs.ContentSourceConfigArgs
    ///         {
    ///             Path = "blueprint01",
    ///             Branch = "master",
    ///             Repository = "vracontent/vra8_content_source_test",
    ///             ContentType = "BLUEPRINT",
    ///             ProjectName = @var.Project_name,
    ///             IntegrationId = @var.Integration_id,
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Content source can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import vra:contentsource/contentSource:ContentSource this 05956583-6488-4e7d-84c9-92a7b7219a15`
    /// ```
    /// </summary>
    [VraResourceType("vra:contentsource/contentSource:ContentSource")]
    public partial class ContentSource : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Content source custom configuration.
        /// </summary>
        [Output("config")]
        public Output<Outputs.ContentSourceConfig> Config { get; private set; } = null!;

        /// <summary>
        /// Date when the entity was created. The date is in ISO 6801 and UTC.
        /// </summary>
        [Output("createdAt")]
        public Output<string> CreatedAt { get; private set; } = null!;

        /// <summary>
        /// The user the entity was created by.
        /// </summary>
        [Output("createdBy")]
        public Output<string> CreatedBy { get; private set; } = null!;

        /// <summary>
        /// A human-friendly description.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// Date when the entity was last updated. The date is in ISO 6801 and UTC.
        /// </summary>
        [Output("lastUpdatedAt")]
        public Output<string> LastUpdatedAt { get; private set; } = null!;

        /// <summary>
        /// The user the entity was last updated by.
        /// </summary>
        [Output("lastUpdatedBy")]
        public Output<string> LastUpdatedBy { get; private set; } = null!;

        /// <summary>
        /// A human-friendly name for content source used as an identifier in APIs that support this option.
        /// </summary>
        [Output("name")]
        public Output<string> Name { get; private set; } = null!;

        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        [Output("orgId")]
        public Output<string> OrgId { 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>
        /// Flag indicating whether sync is enabled for this content source.
        /// </summary>
        [Output("syncEnabled")]
        public Output<bool> SyncEnabled { get; private set; } = null!;

        /// <summary>
        /// Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        /// </summary>
        [Output("typeId")]
        public Output<string> TypeId { get; private set; } = null!;


        /// <summary>
        /// Create a ContentSource 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 ContentSource(string name, ContentSourceArgs args, CustomResourceOptions? options = null)
            : base("vra:contentsource/contentSource:ContentSource", name, args ?? new ContentSourceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ContentSource(string name, Input<string> id, ContentSourceState? state = null, CustomResourceOptions? options = null)
            : base("vra:contentsource/contentSource:ContentSource", 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 ContentSource 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 ContentSource Get(string name, Input<string> id, ContentSourceState? state = null, CustomResourceOptions? options = null)
        {
            return new ContentSource(name, id, state, options);
        }
    }

    public sealed class ContentSourceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Content source custom configuration.
        /// </summary>
        [Input("config", required: true)]
        public Input<Inputs.ContentSourceConfigArgs> Config { get; set; } = null!;

        /// <summary>
        /// A human-friendly description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// A human-friendly name for content source used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

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

        /// <summary>
        /// Flag indicating whether sync is enabled for this content source.
        /// </summary>
        [Input("syncEnabled", required: true)]
        public Input<bool> SyncEnabled { get; set; } = null!;

        /// <summary>
        /// Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        /// </summary>
        [Input("typeId", required: true)]
        public Input<string> TypeId { get; set; } = null!;

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

    public sealed class ContentSourceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Content source custom configuration.
        /// </summary>
        [Input("config")]
        public Input<Inputs.ContentSourceConfigGetArgs>? Config { get; set; }

        /// <summary>
        /// Date when the entity was created. The date is in ISO 6801 and UTC.
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

        /// <summary>
        /// The user the entity was created by.
        /// </summary>
        [Input("createdBy")]
        public Input<string>? CreatedBy { get; set; }

        /// <summary>
        /// A human-friendly description.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// Date when the entity was last updated. The date is in ISO 6801 and UTC.
        /// </summary>
        [Input("lastUpdatedAt")]
        public Input<string>? LastUpdatedAt { get; set; }

        /// <summary>
        /// The user the entity was last updated by.
        /// </summary>
        [Input("lastUpdatedBy")]
        public Input<string>? LastUpdatedBy { get; set; }

        /// <summary>
        /// A human-friendly name for content source used as an identifier in APIs that support this option.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

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

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

        /// <summary>
        /// Flag indicating whether sync is enabled for this content source.
        /// </summary>
        [Input("syncEnabled")]
        public Input<bool>? SyncEnabled { get; set; }

        /// <summary>
        /// Content Source type. Supported values are `com.gitlab`, `com.github`, `com.vmware.marketplace`, `org.bitbucket`.
        /// </summary>
        [Input("typeId")]
        public Input<string>? TypeId { get; set; }

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