// *** 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.Deployment
{
    /// <summary>
    /// This resource provides a way to create a deployment in vRealize Automation(vRA) by either using a blueprint, or catalog item, or an inline blueprint.
    /// 
    /// ## Example Usage
    /// 
    /// ## Import
    /// 
    /// Deployment can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import vra:deployment/deployment:Deployment this 05956583-6488-4e7d-84c9-92a7b7219a15`
    /// ```
    /// </summary>
    [VraResourceType("vra:deployment/deployment:Deployment")]
    public partial class Deployment : global::Pulumi.CustomResource
    {
        /// <summary>
        /// vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        /// </summary>
        [Output("blueprintContent")]
        public Output<string?> BlueprintContent { get; private set; } = null!;

        /// <summary>
        /// Identifier of the requested blueprint in the form ‘UUID:version’.
        /// </summary>
        [Output("blueprintId")]
        public Output<string> BlueprintId { get; private set; } = null!;

        /// <summary>
        /// The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        /// </summary>
        [Output("blueprintVersion")]
        public Output<string> BlueprintVersion { get; private set; } = null!;

        /// <summary>
        /// The id of the vRA catalog item to request the deployment. Conflicts with `blueprint_id` and `blueprint_content`.
        /// </summary>
        [Output("catalogItemId")]
        public Output<string> CatalogItemId { get; private set; } = null!;

        /// <summary>
        /// The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        /// </summary>
        [Output("catalogItemVersion")]
        public Output<string> CatalogItemVersion { get; private set; } = null!;

        /// <summary>
        /// Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
        /// </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!;

        [Output("expandLastRequest")]
        public Output<bool?> ExpandLastRequest { get; private set; } = null!;

        /// <summary>
        /// Flag to indicate whether to expand project information.
        /// </summary>
        [Output("expandProject")]
        public Output<bool?> ExpandProject { get; private set; } = null!;

        [Output("expandResources")]
        public Output<bool?> ExpandResources { get; private set; } = null!;

        /// <summary>
        /// Expense incurred for the deployment.
        /// </summary>
        [Output("expenses")]
        public Output<ImmutableArray<Outputs.DeploymentExpense>> Expenses { get; private set; } = null!;

        /// <summary>
        /// Inputs provided by the user. For inputs including those with default values, refer to `inputs_including_defaults`.
        /// </summary>
        [Output("inputs")]
        public Output<ImmutableDictionary<string, string>?> Inputs { get; private set; } = null!;

        /// <summary>
        /// All the inputs applied during last create/update operation, including those with default values. For the list of inputs provided by the user in the configuration, refer to `inputs`.
        /// </summary>
        [Output("inputsIncludingDefaults")]
        public Output<ImmutableDictionary<string, string>> InputsIncludingDefaults { get; private set; } = null!;

        /// <summary>
        /// Represents deployment requests.
        /// </summary>
        [Output("lastRequests")]
        public Output<ImmutableArray<Outputs.DeploymentLastRequest>> LastRequests { get; private set; } = null!;

        /// <summary>
        /// Time at which the deployment was last updated.
        /// </summary>
        [Output("lastUpdatedAt")]
        public Output<string> LastUpdatedAt { get; private set; } = null!;

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

        /// <summary>
        /// Time at which the deployment lease expires.
        /// </summary>
        [Output("leaseExpireAt")]
        public Output<string> LeaseExpireAt { get; private set; } = null!;

        /// <summary>
        /// A human-friendly name 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 deployment belongs to.
        /// </summary>
        [Output("orgId")]
        public Output<string> OrgId { get; private set; } = null!;

        /// <summary>
        /// The user this deployment belongs to. At create, the owner is ignored but is used to update during next apply.
        /// </summary>
        [Output("owner")]
        public Output<string> Owner { 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>
        /// The project this entity belongs to.
        /// </summary>
        [Output("projects")]
        public Output<ImmutableArray<Outputs.DeploymentProject>> Projects { get; private set; } = null!;

        /// <summary>
        /// Expanded resources for the deployment. Content of this property will not be maintained backward compatible.
        /// </summary>
        [Output("resources")]
        public Output<ImmutableArray<Outputs.DeploymentResource>> Resources { get; private set; } = null!;

        /// <summary>
        /// Deployment status. Supported values are: `CREATE_SUCCESSFUL`, `CREATE_INPROGRESS`, `CREATE_FAILED`, `UPDATE_SUCCESSFUL`, `UPDATE_INPROGRESS`, `UPDATE_FAILED`, `DELETE_SUCCESSFUL`, `DELETE_INPROGRESS`, `DELETE_FAILED`, `ACTION_SUCCESSFUL`, `ACTION_INPROGRESS`, `ACTION_FAILED`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;


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

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

    public sealed class DeploymentArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        /// </summary>
        [Input("blueprintContent")]
        public Input<string>? BlueprintContent { get; set; }

        /// <summary>
        /// Identifier of the requested blueprint in the form ‘UUID:version’.
        /// </summary>
        [Input("blueprintId")]
        public Input<string>? BlueprintId { get; set; }

        /// <summary>
        /// The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        /// </summary>
        [Input("blueprintVersion")]
        public Input<string>? BlueprintVersion { get; set; }

        /// <summary>
        /// The id of the vRA catalog item to request the deployment. Conflicts with `blueprint_id` and `blueprint_content`.
        /// </summary>
        [Input("catalogItemId")]
        public Input<string>? CatalogItemId { get; set; }

        /// <summary>
        /// The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        /// </summary>
        [Input("catalogItemVersion")]
        public Input<string>? CatalogItemVersion { get; set; }

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

        [Input("expandLastRequest")]
        public Input<bool>? ExpandLastRequest { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand project information.
        /// </summary>
        [Input("expandProject")]
        public Input<bool>? ExpandProject { get; set; }

        [Input("expandResources")]
        public Input<bool>? ExpandResources { get; set; }

        [Input("inputs")]
        private InputMap<string>? _inputs;

        /// <summary>
        /// Inputs provided by the user. For inputs including those with default values, refer to `inputs_including_defaults`.
        /// </summary>
        public InputMap<string> Inputs
        {
            get => _inputs ?? (_inputs = new InputMap<string>());
            set => _inputs = value;
        }

        /// <summary>
        /// Time at which the deployment lease expires.
        /// </summary>
        [Input("leaseExpireAt")]
        public Input<string>? LeaseExpireAt { get; set; }

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

        /// <summary>
        /// The user this deployment belongs to. At create, the owner is ignored but is used to update during next apply.
        /// </summary>
        [Input("owner")]
        public Input<string>? Owner { get; set; }

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

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

    public sealed class DeploymentState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// vRA Cloud template content. Conflicts with `blueprint_id` and `catalog_item_id`.
        /// </summary>
        [Input("blueprintContent")]
        public Input<string>? BlueprintContent { get; set; }

        /// <summary>
        /// Identifier of the requested blueprint in the form ‘UUID:version’.
        /// </summary>
        [Input("blueprintId")]
        public Input<string>? BlueprintId { get; set; }

        /// <summary>
        /// The version of the vRA cloud template to request the deployment. Used only when `blueprint_id` is provided.
        /// </summary>
        [Input("blueprintVersion")]
        public Input<string>? BlueprintVersion { get; set; }

        /// <summary>
        /// The id of the vRA catalog item to request the deployment. Conflicts with `blueprint_id` and `blueprint_content`.
        /// </summary>
        [Input("catalogItemId")]
        public Input<string>? CatalogItemId { get; set; }

        /// <summary>
        /// The version of the vRA catalog item to request the deployment. Used only when `catalog_item_id` is provided.
        /// </summary>
        [Input("catalogItemVersion")]
        public Input<string>? CatalogItemVersion { get; set; }

        /// <summary>
        /// Creation time (e.g. date format ‘2019-07-13T23:16:49.310Z’).
        /// </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; }

        [Input("expandLastRequest")]
        public Input<bool>? ExpandLastRequest { get; set; }

        /// <summary>
        /// Flag to indicate whether to expand project information.
        /// </summary>
        [Input("expandProject")]
        public Input<bool>? ExpandProject { get; set; }

        [Input("expandResources")]
        public Input<bool>? ExpandResources { get; set; }

        [Input("expenses")]
        private InputList<Inputs.DeploymentExpenseGetArgs>? _expenses;

        /// <summary>
        /// Expense incurred for the deployment.
        /// </summary>
        public InputList<Inputs.DeploymentExpenseGetArgs> Expenses
        {
            get => _expenses ?? (_expenses = new InputList<Inputs.DeploymentExpenseGetArgs>());
            set => _expenses = value;
        }

        [Input("inputs")]
        private InputMap<string>? _inputs;

        /// <summary>
        /// Inputs provided by the user. For inputs including those with default values, refer to `inputs_including_defaults`.
        /// </summary>
        public InputMap<string> Inputs
        {
            get => _inputs ?? (_inputs = new InputMap<string>());
            set => _inputs = value;
        }

        [Input("inputsIncludingDefaults")]
        private InputMap<string>? _inputsIncludingDefaults;

        /// <summary>
        /// All the inputs applied during last create/update operation, including those with default values. For the list of inputs provided by the user in the configuration, refer to `inputs`.
        /// </summary>
        public InputMap<string> InputsIncludingDefaults
        {
            get => _inputsIncludingDefaults ?? (_inputsIncludingDefaults = new InputMap<string>());
            set => _inputsIncludingDefaults = value;
        }

        [Input("lastRequests")]
        private InputList<Inputs.DeploymentLastRequestGetArgs>? _lastRequests;

        /// <summary>
        /// Represents deployment requests.
        /// </summary>
        public InputList<Inputs.DeploymentLastRequestGetArgs> LastRequests
        {
            get => _lastRequests ?? (_lastRequests = new InputList<Inputs.DeploymentLastRequestGetArgs>());
            set => _lastRequests = value;
        }

        /// <summary>
        /// Time at which the deployment was last updated.
        /// </summary>
        [Input("lastUpdatedAt")]
        public Input<string>? LastUpdatedAt { get; set; }

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

        /// <summary>
        /// Time at which the deployment lease expires.
        /// </summary>
        [Input("leaseExpireAt")]
        public Input<string>? LeaseExpireAt { get; set; }

        /// <summary>
        /// A human-friendly name 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 deployment belongs to.
        /// </summary>
        [Input("orgId")]
        public Input<string>? OrgId { get; set; }

        /// <summary>
        /// The user this deployment belongs to. At create, the owner is ignored but is used to update during next apply.
        /// </summary>
        [Input("owner")]
        public Input<string>? Owner { get; set; }

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

        [Input("projects")]
        private InputList<Inputs.DeploymentProjectGetArgs>? _projects;

        /// <summary>
        /// The project this entity belongs to.
        /// </summary>
        public InputList<Inputs.DeploymentProjectGetArgs> Projects
        {
            get => _projects ?? (_projects = new InputList<Inputs.DeploymentProjectGetArgs>());
            set => _projects = value;
        }

        [Input("resources")]
        private InputList<Inputs.DeploymentResourceGetArgs>? _resources;

        /// <summary>
        /// Expanded resources for the deployment. Content of this property will not be maintained backward compatible.
        /// </summary>
        public InputList<Inputs.DeploymentResourceGetArgs> Resources
        {
            get => _resources ?? (_resources = new InputList<Inputs.DeploymentResourceGetArgs>());
            set => _resources = value;
        }

        /// <summary>
        /// Deployment status. Supported values are: `CREATE_SUCCESSFUL`, `CREATE_INPROGRESS`, `CREATE_FAILED`, `UPDATE_SUCCESSFUL`, `UPDATE_INPROGRESS`, `UPDATE_FAILED`, `DELETE_SUCCESSFUL`, `DELETE_INPROGRESS`, `DELETE_FAILED`, `ACTION_SUCCESSFUL`, `ACTION_INPROGRESS`, `ACTION_FAILED`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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