# 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__ = [
    'GetSourceEntitlementResult',
    'AwaitableGetSourceEntitlementResult',
    'get_source_entitlement',
    'get_source_entitlement_output',
]

@pulumi.output_type
class GetSourceEntitlementResult:
    """
    A collection of values returned by getSourceEntitlement.
    """
    def __init__(__self__, catalog_source_id=None, definitions=None, id=None, project_id=None):
        if catalog_source_id and not isinstance(catalog_source_id, str):
            raise TypeError("Expected argument 'catalog_source_id' to be a str")
        pulumi.set(__self__, "catalog_source_id", catalog_source_id)
        if definitions and not isinstance(definitions, list):
            raise TypeError("Expected argument 'definitions' to be a list")
        pulumi.set(__self__, "definitions", definitions)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", 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)

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

    @property
    @pulumi.getter
    def definitions(self) -> Sequence['outputs.GetSourceEntitlementDefinitionResult']:
        """
        Represents a catalog source that is linked to a project via an entitlement.
        """
        return pulumi.get(self, "definitions")

    @property
    @pulumi.getter
    def id(self) -> Optional[str]:
        """
        Id of the catalog source.
        """
        return pulumi.get(self, "id")

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


class AwaitableGetSourceEntitlementResult(GetSourceEntitlementResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSourceEntitlementResult(
            catalog_source_id=self.catalog_source_id,
            definitions=self.definitions,
            id=self.id,
            project_id=self.project_id)


def get_source_entitlement(catalog_source_id: Optional[str] = None,
                           id: Optional[str] = None,
                           project_id: Optional[str] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSourceEntitlementResult:
    """
    This data source provides information about a catalog source entitlement in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA catalog source entitlement by its id:

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_source_entitlement(id=var["catalog_source_entitlement_id"],
        project_id=var["project_id"])
    ```

    This is an example of how to get a vRA catalog source entitlement by its catalog source id:

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_source_entitlement(catalog_source_id=var["catalog_source_id"],
        project_id=var["project_id"])
    ```


    :param str catalog_source_id: The id of the catalog source to find the entitlement. One of `catalog_source_id` or `id` must be provided.
    :param str id: The id of entitlement. One of `catalog_source_id` or `id` must be provided.
    :param str project_id: The id of the project that this entitlement belongs to.
    """
    __args__ = dict()
    __args__['catalogSourceId'] = catalog_source_id
    __args__['id'] = id
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('vra:catalog/getSourceEntitlement:getSourceEntitlement', __args__, opts=opts, typ=GetSourceEntitlementResult).value

    return AwaitableGetSourceEntitlementResult(
        catalog_source_id=__ret__.catalog_source_id,
        definitions=__ret__.definitions,
        id=__ret__.id,
        project_id=__ret__.project_id)


@_utilities.lift_output_func(get_source_entitlement)
def get_source_entitlement_output(catalog_source_id: Optional[pulumi.Input[Optional[str]]] = None,
                                  id: Optional[pulumi.Input[Optional[str]]] = None,
                                  project_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetSourceEntitlementResult]:
    """
    This data source provides information about a catalog source entitlement in vRA.

    ## Example Usage
    ### S

    This is an example of how to get a vRA catalog source entitlement by its id:

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_source_entitlement(id=var["catalog_source_entitlement_id"],
        project_id=var["project_id"])
    ```

    This is an example of how to get a vRA catalog source entitlement by its catalog source id:

    ```python
    import pulumi
    import pulumi_vra as vra

    this = vra.catalog.get_source_entitlement(catalog_source_id=var["catalog_source_id"],
        project_id=var["project_id"])
    ```


    :param str catalog_source_id: The id of the catalog source to find the entitlement. One of `catalog_source_id` or `id` must be provided.
    :param str id: The id of entitlement. One of `catalog_source_id` or `id` must be provided.
    :param str project_id: The id of the project that this entitlement belongs to.
    """
    ...
