# coding=utf-8
# *** 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! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs

__all__ = [
    'GetBlueprintResult',
    'AwaitableGetBlueprintResult',
    'get_blueprint',
    'get_blueprint_output',
]

@pulumi.output_type
class GetBlueprintResult:
    """
    A collection of values returned by getBlueprint.
    """
    def __init__(__self__, content=None, content_source_id=None, content_source_path=None, content_source_sync_at=None, content_source_sync_messages=None, content_source_sync_status=None, content_source_type=None, created_at=None, created_by=None, description=None, id=None, name=None, org_id=None, project_id=None, project_name=None, request_scope_org=None, self_link=None, status=None, total_released_versions=None, total_versions=None, updated_at=None, updated_by=None, valid=None, validation_messages=None):
        if content and not isinstance(content, str):
            raise TypeError("Expected argument 'content' to be a str")
        pulumi.set(__self__, "content", content)
        if content_source_id and not isinstance(content_source_id, str):
            raise TypeError("Expected argument 'content_source_id' to be a str")
        pulumi.set(__self__, "content_source_id", content_source_id)
        if content_source_path and not isinstance(content_source_path, str):
            raise TypeError("Expected argument 'content_source_path' to be a str")
        pulumi.set(__self__, "content_source_path", content_source_path)
        if content_source_sync_at and not isinstance(content_source_sync_at, str):
            raise TypeError("Expected argument 'content_source_sync_at' to be a str")
        pulumi.set(__self__, "content_source_sync_at", content_source_sync_at)
        if content_source_sync_messages and not isinstance(content_source_sync_messages, list):
            raise TypeError("Expected argument 'content_source_sync_messages' to be a list")
        pulumi.set(__self__, "content_source_sync_messages", content_source_sync_messages)
        if content_source_sync_status and not isinstance(content_source_sync_status, str):
            raise TypeError("Expected argument 'content_source_sync_status' to be a str")
        pulumi.set(__self__, "content_source_sync_status", content_source_sync_status)
        if content_source_type and not isinstance(content_source_type, str):
            raise TypeError("Expected argument 'content_source_type' to be a str")
        pulumi.set(__self__, "content_source_type", content_source_type)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if created_by and not isinstance(created_by, str):
            raise TypeError("Expected argument 'created_by' to be a str")
        pulumi.set(__self__, "created_by", created_by)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if org_id and not isinstance(org_id, str):
            raise TypeError("Expected argument 'org_id' to be a str")
        pulumi.set(__self__, "org_id", org_id)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if project_name and not isinstance(project_name, str):
            raise TypeError("Expected argument 'project_name' to be a str")
        pulumi.set(__self__, "project_name", project_name)
        if request_scope_org and not isinstance(request_scope_org, bool):
            raise TypeError("Expected argument 'request_scope_org' to be a bool")
        pulumi.set(__self__, "request_scope_org", request_scope_org)
        if self_link and not isinstance(self_link, str):
            raise TypeError("Expected argument 'self_link' to be a str")
        pulumi.set(__self__, "self_link", self_link)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        if total_released_versions and not isinstance(total_released_versions, int):
            raise TypeError("Expected argument 'total_released_versions' to be a int")
        pulumi.set(__self__, "total_released_versions", total_released_versions)
        if total_versions and not isinstance(total_versions, int):
            raise TypeError("Expected argument 'total_versions' to be a int")
        pulumi.set(__self__, "total_versions", total_versions)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if updated_by and not isinstance(updated_by, str):
            raise TypeError("Expected argument 'updated_by' to be a str")
        pulumi.set(__self__, "updated_by", updated_by)
        if valid and not isinstance(valid, bool):
            raise TypeError("Expected argument 'valid' to be a bool")
        pulumi.set(__self__, "valid", valid)
        if validation_messages and not isinstance(validation_messages, list):
            raise TypeError("Expected argument 'validation_messages' to be a list")
        pulumi.set(__self__, "validation_messages", validation_messages)

    @property
    @pulumi.getter
    def content(self) -> str:
        """
        Blueprint YAML content.
        """
        return pulumi.get(self, "content")

    @property
    @pulumi.getter(name="contentSourceId")
    def content_source_id(self) -> str:
        """
        The id of the content source.
        """
        return pulumi.get(self, "content_source_id")

    @property
    @pulumi.getter(name="contentSourcePath")
    def content_source_path(self) -> str:
        """
        Content source path.
        """
        return pulumi.get(self, "content_source_path")

    @property
    @pulumi.getter(name="contentSourceSyncAt")
    def content_source_sync_at(self) -> str:
        """
        Content source last sync at.
        """
        return pulumi.get(self, "content_source_sync_at")

    @property
    @pulumi.getter(name="contentSourceSyncMessages")
    def content_source_sync_messages(self) -> Sequence[str]:
        """
        Content source last sync messages.
        """
        return pulumi.get(self, "content_source_sync_messages")

    @property
    @pulumi.getter(name="contentSourceSyncStatus")
    def content_source_sync_status(self) -> str:
        """
        Content source last sync status. Supported values: `SUCCESSFUL`, `FAILED`.
        """
        return pulumi.get(self, "content_source_sync_status")

    @property
    @pulumi.getter(name="contentSourceType")
    def content_source_type(self) -> str:
        """
        Content source type.
        """
        return pulumi.get(self, "content_source_type")

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        Date when the entity was created. The date is in ISO 6801 and UTC.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="createdBy")
    def created_by(self) -> str:
        """
        The user the entity was created by.
        """
        return pulumi.get(self, "created_by")

    @property
    @pulumi.getter
    def description(self) -> str:
        """
        A human-friendly description.
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter
    def id(self) -> str:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> Optional[str]:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> str:
        """
        The id of the organization this entity belongs to.
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> str:
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> str:
        """
        The name of the project the entity belongs to.
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter(name="requestScopeOrg")
    def request_scope_org(self) -> bool:
        """
        Flag to indicate whether this blueprint can be requested from any project in the organization this entity belongs to.
        """
        return pulumi.get(self, "request_scope_org")

    @property
    @pulumi.getter(name="selfLink")
    def self_link(self) -> str:
        """
        HATEOAS of the entity.
        """
        return pulumi.get(self, "self_link")

    @property
    @pulumi.getter
    def status(self) -> str:
        """
        Status of the cloud template. Supported values: `DRAFT`, `VERSIONED`, `RELEASED`.
        """
        return pulumi.get(self, "status")

    @property
    @pulumi.getter(name="totalReleasedVersions")
    def total_released_versions(self) -> int:
        """
        Total number of released versions.
        """
        return pulumi.get(self, "total_released_versions")

    @property
    @pulumi.getter(name="totalVersions")
    def total_versions(self) -> int:
        """
        Total number of versions.
        """
        return pulumi.get(self, "total_versions")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> str:
        """
        Date when the entity was last updated. The date is ISO 8601 and UTC.
        """
        return pulumi.get(self, "updated_at")

    @property
    @pulumi.getter(name="updatedBy")
    def updated_by(self) -> str:
        """
        The user the entity was last updated by.
        """
        return pulumi.get(self, "updated_by")

    @property
    @pulumi.getter
    def valid(self) -> bool:
        """
        Flag to indicate if the current content of the cloud template is valid.
        """
        return pulumi.get(self, "valid")

    @property
    @pulumi.getter(name="validationMessages")
    def validation_messages(self) -> Sequence['outputs.GetBlueprintValidationMessageResult']:
        """
        List of validations messages.
        * message - Validation message.
        """
        return pulumi.get(self, "validation_messages")


class AwaitableGetBlueprintResult(GetBlueprintResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetBlueprintResult(
            content=self.content,
            content_source_id=self.content_source_id,
            content_source_path=self.content_source_path,
            content_source_sync_at=self.content_source_sync_at,
            content_source_sync_messages=self.content_source_sync_messages,
            content_source_sync_status=self.content_source_sync_status,
            content_source_type=self.content_source_type,
            created_at=self.created_at,
            created_by=self.created_by,
            description=self.description,
            id=self.id,
            name=self.name,
            org_id=self.org_id,
            project_id=self.project_id,
            project_name=self.project_name,
            request_scope_org=self.request_scope_org,
            self_link=self.self_link,
            status=self.status,
            total_released_versions=self.total_released_versions,
            total_versions=self.total_versions,
            updated_at=self.updated_at,
            updated_by=self.updated_by,
            valid=self.valid,
            validation_messages=self.validation_messages)


def get_blueprint(id: Optional[str] = None,
                  name: Optional[str] = None,
                  project_id: Optional[str] = None,
                  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetBlueprintResult:
    """
    This data source provides information about a cloud template (blueprint) in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA cloud template by its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blueprint.get_blueprint(name=vra_blueprint["this"]["name"])
    ```

    This is an example of how to get a vRA cloud template by its id.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blueprint.get_blueprint(id=vra_blueprint["this"]["id"])
    ```


    :param str id: The id of this cloud template. One of `id` or `name` must be provided.
    :param str name: Name of the cloud template. One of `id` or `name` must be provided.
    :param str project_id: The id of the project to narrow the search while looking for cloud templates.
    """
    __args__ = dict()
    __args__['id'] = id
    __args__['name'] = name
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:blueprint/getBlueprint:getBlueprint', __args__, opts=opts, typ=GetBlueprintResult).value

    return AwaitableGetBlueprintResult(
        content=__ret__.content,
        content_source_id=__ret__.content_source_id,
        content_source_path=__ret__.content_source_path,
        content_source_sync_at=__ret__.content_source_sync_at,
        content_source_sync_messages=__ret__.content_source_sync_messages,
        content_source_sync_status=__ret__.content_source_sync_status,
        content_source_type=__ret__.content_source_type,
        created_at=__ret__.created_at,
        created_by=__ret__.created_by,
        description=__ret__.description,
        id=__ret__.id,
        name=__ret__.name,
        org_id=__ret__.org_id,
        project_id=__ret__.project_id,
        project_name=__ret__.project_name,
        request_scope_org=__ret__.request_scope_org,
        self_link=__ret__.self_link,
        status=__ret__.status,
        total_released_versions=__ret__.total_released_versions,
        total_versions=__ret__.total_versions,
        updated_at=__ret__.updated_at,
        updated_by=__ret__.updated_by,
        valid=__ret__.valid,
        validation_messages=__ret__.validation_messages)


@_utilities.lift_output_func(get_blueprint)
def get_blueprint_output(id: Optional[pulumi.Input[Optional[str]]] = None,
                         name: Optional[pulumi.Input[Optional[str]]] = None,
                         project_id: Optional[pulumi.Input[Optional[str]]] = None,
                         opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetBlueprintResult]:
    """
    This data source provides information about a cloud template (blueprint) in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA cloud template by its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blueprint.get_blueprint(name=vra_blueprint["this"]["name"])
    ```

    This is an example of how to get a vRA cloud template by its id.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blueprint.get_blueprint(id=vra_blueprint["this"]["id"])
    ```


    :param str id: The id of this cloud template. One of `id` or `name` must be provided.
    :param str name: Name of the cloud template. One of `id` or `name` must be provided.
    :param str project_id: The id of the project to narrow the search while looking for cloud templates.
    """
    ...
