// *** 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.Blueprint
{
    public static class GetBlueprint
    {
        /// <summary>
        /// This data source provides information about a cloud template (blueprint) in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA cloud template by its name.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blueprint.GetBlueprint.Invoke(new()
        ///     {
        ///         Name = vra_blueprint.This.Name,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA cloud template by its id.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blueprint.GetBlueprint.Invoke(new()
        ///     {
        ///         Id = vra_blueprint.This.Id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetBlueprintResult> InvokeAsync(GetBlueprintArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetBlueprintResult>("vra:blueprint/getBlueprint:getBlueprint", args ?? new GetBlueprintArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides information about a cloud template (blueprint) in vRA.
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// ### S
        /// 
        /// This is an example of how to get a vRA cloud template by its name.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blueprint.GetBlueprint.Invoke(new()
        ///     {
        ///         Name = vra_blueprint.This.Name,
        ///     });
        /// 
        /// });
        /// ```
        /// 
        /// This is an example of how to get a vRA cloud template by its id.
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using Vra = Pulumi.Vra;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @this = Vra.Blueprint.GetBlueprint.Invoke(new()
        ///     {
        ///         Id = vra_blueprint.This.Id,
        ///     });
        /// 
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetBlueprintResult> Invoke(GetBlueprintInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetBlueprintResult>("vra:blueprint/getBlueprint:getBlueprint", args ?? new GetBlueprintInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetBlueprintArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of this cloud template. One of `id` or `name` must be provided.
        /// </summary>
        [Input("id")]
        public string? Id { get; set; }

        /// <summary>
        /// Name of the cloud template. One of `id` or `name` must be provided.
        /// </summary>
        [Input("name")]
        public string? Name { get; set; }

        /// <summary>
        /// The id of the project to narrow the search while looking for cloud templates.
        /// </summary>
        [Input("projectId")]
        public string? ProjectId { get; set; }

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

    public sealed class GetBlueprintInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The id of this cloud template. One of `id` or `name` must be provided.
        /// </summary>
        [Input("id")]
        public Input<string>? Id { get; set; }

        /// <summary>
        /// Name of the cloud template. One of `id` or `name` must be provided.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The id of the project to narrow the search while looking for cloud templates.
        /// </summary>
        [Input("projectId")]
        public Input<string>? ProjectId { get; set; }

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


    [OutputType]
    public sealed class GetBlueprintResult
    {
        /// <summary>
        /// Blueprint YAML content.
        /// </summary>
        public readonly string Content;
        /// <summary>
        /// The id of the content source.
        /// </summary>
        public readonly string ContentSourceId;
        /// <summary>
        /// Content source path.
        /// </summary>
        public readonly string ContentSourcePath;
        /// <summary>
        /// Content source last sync at.
        /// </summary>
        public readonly string ContentSourceSyncAt;
        /// <summary>
        /// Content source last sync messages.
        /// </summary>
        public readonly ImmutableArray<string> ContentSourceSyncMessages;
        /// <summary>
        /// Content source last sync status. Supported values: `SUCCESSFUL`, `FAILED`.
        /// </summary>
        public readonly string ContentSourceSyncStatus;
        /// <summary>
        /// Content source type.
        /// </summary>
        public readonly string ContentSourceType;
        /// <summary>
        /// Date when the entity was created. The date is in ISO 6801 and UTC.
        /// </summary>
        public readonly string CreatedAt;
        /// <summary>
        /// The user the entity was created by.
        /// </summary>
        public readonly string CreatedBy;
        /// <summary>
        /// A human-friendly description.
        /// </summary>
        public readonly string Description;
        public readonly string Id;
        public readonly string? Name;
        /// <summary>
        /// The id of the organization this entity belongs to.
        /// </summary>
        public readonly string OrgId;
        public readonly string ProjectId;
        /// <summary>
        /// The name of the project the entity belongs to.
        /// </summary>
        public readonly string ProjectName;
        /// <summary>
        /// Flag to indicate whether this blueprint can be requested from any project in the organization this entity belongs to.
        /// </summary>
        public readonly bool RequestScopeOrg;
        /// <summary>
        /// HATEOAS of the entity.
        /// </summary>
        public readonly string SelfLink;
        /// <summary>
        /// Status of the cloud template. Supported values: `DRAFT`, `VERSIONED`, `RELEASED`.
        /// </summary>
        public readonly string Status;
        /// <summary>
        /// Total number of released versions.
        /// </summary>
        public readonly int TotalReleasedVersions;
        /// <summary>
        /// Total number of versions.
        /// </summary>
        public readonly int TotalVersions;
        /// <summary>
        /// Date when the entity was last updated. The date is ISO 8601 and UTC.
        /// </summary>
        public readonly string UpdatedAt;
        /// <summary>
        /// The user the entity was last updated by.
        /// </summary>
        public readonly string UpdatedBy;
        /// <summary>
        /// Flag to indicate if the current content of the cloud template is valid.
        /// </summary>
        public readonly bool Valid;
        /// <summary>
        /// List of validations messages.
        /// * message - Validation message.
        /// </summary>
        public readonly ImmutableArray<Outputs.GetBlueprintValidationMessageResult> ValidationMessages;

        [OutputConstructor]
        private GetBlueprintResult(
            string content,

            string contentSourceId,

            string contentSourcePath,

            string contentSourceSyncAt,

            ImmutableArray<string> contentSourceSyncMessages,

            string contentSourceSyncStatus,

            string contentSourceType,

            string createdAt,

            string createdBy,

            string description,

            string id,

            string? name,

            string orgId,

            string projectId,

            string projectName,

            bool requestScopeOrg,

            string selfLink,

            string status,

            int totalReleasedVersions,

            int totalVersions,

            string updatedAt,

            string updatedBy,

            bool valid,

            ImmutableArray<Outputs.GetBlueprintValidationMessageResult> validationMessages)
        {
            Content = content;
            ContentSourceId = contentSourceId;
            ContentSourcePath = contentSourcePath;
            ContentSourceSyncAt = contentSourceSyncAt;
            ContentSourceSyncMessages = contentSourceSyncMessages;
            ContentSourceSyncStatus = contentSourceSyncStatus;
            ContentSourceType = contentSourceType;
            CreatedAt = createdAt;
            CreatedBy = createdBy;
            Description = description;
            Id = id;
            Name = name;
            OrgId = orgId;
            ProjectId = projectId;
            ProjectName = projectName;
            RequestScopeOrg = requestScopeOrg;
            SelfLink = selfLink;
            Status = status;
            TotalReleasedVersions = totalReleasedVersions;
            TotalVersions = totalVersions;
            UpdatedAt = updatedAt;
            UpdatedBy = updatedBy;
            Valid = valid;
            ValidationMessages = validationMessages;
        }
    }
}
