# 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__ = [
    'GetItemResult',
    'AwaitableGetItemResult',
    'get_item',
    'get_item_output',
]

@pulumi.output_type
class GetItemResult:
    """
    A collection of values returned by getItem.
    """
    def __init__(__self__, created_at=None, created_by=None, description=None, expand_projects=None, expand_versions=None, id=None, last_updated_at=None, last_updated_by=None, name=None, project_ids=None, projects=None, schema=None, source_id=None, source_name=None, types=None, versions=None):
        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 expand_projects and not isinstance(expand_projects, bool):
            raise TypeError("Expected argument 'expand_projects' to be a bool")
        pulumi.set(__self__, "expand_projects", expand_projects)
        if expand_versions and not isinstance(expand_versions, bool):
            raise TypeError("Expected argument 'expand_versions' to be a bool")
        pulumi.set(__self__, "expand_versions", expand_versions)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if last_updated_at and not isinstance(last_updated_at, str):
            raise TypeError("Expected argument 'last_updated_at' to be a str")
        pulumi.set(__self__, "last_updated_at", last_updated_at)
        if last_updated_by and not isinstance(last_updated_by, str):
            raise TypeError("Expected argument 'last_updated_by' to be a str")
        pulumi.set(__self__, "last_updated_by", last_updated_by)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if project_ids and not isinstance(project_ids, list):
            raise TypeError("Expected argument 'project_ids' to be a list")
        pulumi.set(__self__, "project_ids", project_ids)
        if projects and not isinstance(projects, list):
            raise TypeError("Expected argument 'projects' to be a list")
        pulumi.set(__self__, "projects", projects)
        if schema and not isinstance(schema, str):
            raise TypeError("Expected argument 'schema' to be a str")
        pulumi.set(__self__, "schema", schema)
        if source_id and not isinstance(source_id, str):
            raise TypeError("Expected argument 'source_id' to be a str")
        pulumi.set(__self__, "source_id", source_id)
        if source_name and not isinstance(source_name, str):
            raise TypeError("Expected argument 'source_name' to be a str")
        pulumi.set(__self__, "source_name", source_name)
        if types and not isinstance(types, list):
            raise TypeError("Expected argument 'types' to be a list")
        pulumi.set(__self__, "types", types)
        if versions and not isinstance(versions, list):
            raise TypeError("Expected argument 'versions' to be a list")
        pulumi.set(__self__, "versions", versions)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        """
        Date-time when catalog item version was created at.
        """
        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(name="expandProjects")
    def expand_projects(self) -> Optional[bool]:
        return pulumi.get(self, "expand_projects")

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

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        Id of the catalog item version.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter(name="lastUpdatedAt")
    def last_updated_at(self) -> str:
        """
        Date-time when the entity was last updated.
        """
        return pulumi.get(self, "last_updated_at")

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

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

    @property
    @pulumi.getter(name="projectIds")
    def project_ids(self) -> Sequence[str]:
        """
        List of associated project IDs that can be used for requesting this catalog item.
        """
        return pulumi.get(self, "project_ids")

    @property
    @pulumi.getter
    def projects(self) -> Sequence['outputs.GetItemProjectResult']:
        """
        List of associated projects that can be used for requesting this catalog item.
        """
        return pulumi.get(self, "projects")

    @property
    @pulumi.getter
    def schema(self) -> str:
        """
        Json schema describing request parameters, a simplified version of http://json-schema.org/latest/json-schema-validation.html#rfc.section.5
        """
        return pulumi.get(self, "schema")

    @property
    @pulumi.getter(name="sourceId")
    def source_id(self) -> str:
        """
        LibraryItem source ID.
        """
        return pulumi.get(self, "source_id")

    @property
    @pulumi.getter(name="sourceName")
    def source_name(self) -> str:
        """
        LibraryItem source name.
        """
        return pulumi.get(self, "source_name")

    @property
    @pulumi.getter
    def types(self) -> Sequence['outputs.GetItemTypeResult']:
        return pulumi.get(self, "types")

    @property
    @pulumi.getter
    def versions(self) -> Sequence['outputs.GetItemVersionResult']:
        """
        Catalog item versions.
        """
        return pulumi.get(self, "versions")


class AwaitableGetItemResult(GetItemResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetItemResult(
            created_at=self.created_at,
            created_by=self.created_by,
            description=self.description,
            expand_projects=self.expand_projects,
            expand_versions=self.expand_versions,
            id=self.id,
            last_updated_at=self.last_updated_at,
            last_updated_by=self.last_updated_by,
            name=self.name,
            project_ids=self.project_ids,
            projects=self.projects,
            schema=self.schema,
            source_id=self.source_id,
            source_name=self.source_name,
            types=self.types,
            versions=self.versions)


def get_item(expand_projects: Optional[bool] = None,
             expand_versions: Optional[bool] = None,
             id: Optional[str] = None,
             name: Optional[str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetItemResult:
    """
    This data source provides information about a catalog item in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA catalog item by its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_item(name=var["catalog_item_name"],
        expand_versions=True)
    ```

    This is an example of how to get a vRA catalog item by its id.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_item(id=var["catalog_item_id"],
        expand_versions=True)
    ```


    :param bool expand_projects: Flag to indicate whether to expand detailed project data for the catalog item.
    :param bool expand_versions: Flag to indicate whether to expand detailed versions of the catalog item.
    :param str id: The id of catalog item. One of `id`, or `name` must be provided.
    :param str name: Name of the catalog item. One of `id`, or `name` must be provided.
    """
    __args__ = dict()
    __args__['expandProjects'] = expand_projects
    __args__['expandVersions'] = expand_versions
    __args__['id'] = id
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:catalog/getItem:getItem', __args__, opts=opts, typ=GetItemResult).value

    return AwaitableGetItemResult(
        created_at=__ret__.created_at,
        created_by=__ret__.created_by,
        description=__ret__.description,
        expand_projects=__ret__.expand_projects,
        expand_versions=__ret__.expand_versions,
        id=__ret__.id,
        last_updated_at=__ret__.last_updated_at,
        last_updated_by=__ret__.last_updated_by,
        name=__ret__.name,
        project_ids=__ret__.project_ids,
        projects=__ret__.projects,
        schema=__ret__.schema,
        source_id=__ret__.source_id,
        source_name=__ret__.source_name,
        types=__ret__.types,
        versions=__ret__.versions)


@_utilities.lift_output_func(get_item)
def get_item_output(expand_projects: Optional[pulumi.Input[Optional[bool]]] = None,
                    expand_versions: Optional[pulumi.Input[Optional[bool]]] = None,
                    id: Optional[pulumi.Input[Optional[str]]] = None,
                    name: Optional[pulumi.Input[Optional[str]]] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetItemResult]:
    """
    This data source provides information about a catalog item in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA catalog item by its name.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_item(name=var["catalog_item_name"],
        expand_versions=True)
    ```

    This is an example of how to get a vRA catalog item by its id.

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_item(id=var["catalog_item_id"],
        expand_versions=True)
    ```


    :param bool expand_projects: Flag to indicate whether to expand detailed project data for the catalog item.
    :param bool expand_versions: Flag to indicate whether to expand detailed versions of the catalog item.
    :param str id: The id of catalog item. One of `id`, or `name` must be provided.
    :param str name: Name of the catalog item. One of `id`, or `name` must be provided.
    """
    ...
