# 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

__all__ = [
    'GetVersionResult',
    'AwaitableGetVersionResult',
    'get_version',
    'get_version_output',
]

@pulumi.output_type
class GetVersionResult:
    """
    A collection of values returned by getVersion.
    """
    def __init__(__self__, blueprint_description=None, blueprint_id=None, content=None, created_at=None, created_by=None, description=None, id=None, name=None, org_id=None, project_id=None, project_name=None, status=None, updated_at=None, updated_by=None, valid=None, version=None, version_change_log=None):
        if blueprint_description and not isinstance(blueprint_description, str):
            raise TypeError("Expected argument 'blueprint_description' to be a str")
        pulumi.set(__self__, "blueprint_description", blueprint_description)
        if blueprint_id and not isinstance(blueprint_id, str):
            raise TypeError("Expected argument 'blueprint_id' to be a str")
        pulumi.set(__self__, "blueprint_id", blueprint_id)
        if content and not isinstance(content, str):
            raise TypeError("Expected argument 'content' to be a str")
        pulumi.set(__self__, "content", content)
        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 status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)
        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, str):
            raise TypeError("Expected argument 'valid' to be a str")
        pulumi.set(__self__, "valid", valid)
        if version and not isinstance(version, str):
            raise TypeError("Expected argument 'version' to be a str")
        pulumi.set(__self__, "version", version)
        if version_change_log and not isinstance(version_change_log, str):
            raise TypeError("Expected argument 'version_change_log' to be a str")
        pulumi.set(__self__, "version_change_log", version_change_log)

    @property
    @pulumi.getter(name="blueprintDescription")
    def blueprint_description(self) -> str:
        """
        Description of the cloud template.
        """
        return pulumi.get(self, "blueprint_description")

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

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

    @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:
        """
        (Optional) Cloud template version description.
        """
        return pulumi.get(self, "description")

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

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        Name of the cloud template version.
        """
        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:
        """
        The id of the project this entity belongs to.
        """
        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
    def status(self) -> str:
        """
        Status of the cloud template. Supported values: `DRAFT`, `VERSIONED`, `RELEASED`.
        """
        return pulumi.get(self, "status")

    @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) -> str:
        """
        Flag to indicate if the current content of the cloud template is valid.
        """
        return pulumi.get(self, "valid")

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

    @property
    @pulumi.getter(name="versionChangeLog")
    def version_change_log(self) -> str:
        """
        Cloud template version change log.
        """
        return pulumi.get(self, "version_change_log")


class AwaitableGetVersionResult(GetVersionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetVersionResult(
            blueprint_description=self.blueprint_description,
            blueprint_id=self.blueprint_id,
            content=self.content,
            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,
            status=self.status,
            updated_at=self.updated_at,
            updated_by=self.updated_by,
            valid=self.valid,
            version=self.version,
            version_change_log=self.version_change_log)


def get_version(blueprint_id: Optional[str] = None,
                id: Optional[str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetVersionResult:
    """
    This data source provides information about a cloud template (blueprint) version in vRA.

    ## Example Usage
    ### S

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blueprint.get_version(blueprint_id=var["blueprint_id"],
        id=var["blueprint_version_id"])
    ```


    :param str blueprint_id: Name of the cloud template. One of `id` or `name` must be provided.
    :param str id: The id of the cloud template version.
    """
    __args__ = dict()
    __args__['blueprintId'] = blueprint_id
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:blueprint/getVersion:getVersion', __args__, opts=opts, typ=GetVersionResult).value

    return AwaitableGetVersionResult(
        blueprint_description=__ret__.blueprint_description,
        blueprint_id=__ret__.blueprint_id,
        content=__ret__.content,
        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,
        status=__ret__.status,
        updated_at=__ret__.updated_at,
        updated_by=__ret__.updated_by,
        valid=__ret__.valid,
        version=__ret__.version,
        version_change_log=__ret__.version_change_log)


@_utilities.lift_output_func(get_version)
def get_version_output(blueprint_id: Optional[pulumi.Input[str]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetVersionResult]:
    """
    This data source provides information about a cloud template (blueprint) version in vRA.

    ## Example Usage
    ### S

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.blueprint.get_version(blueprint_id=var["blueprint_id"],
        id=var["blueprint_version_id"])
    ```


    :param str blueprint_id: Name of the cloud template. One of `id` or `name` must be provided.
    :param str id: The id of the cloud template version.
    """
    ...
