# 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__ = [
    'GetDataSourceResult',
    'AwaitableGetDataSourceResult',
    'get_data_source',
    'get_data_source_output',
]

@pulumi.output_type
class GetDataSourceResult:
    """
    A collection of values returned by getDataSource.
    """
    def __init__(__self__, has_computed_default=None, id=None, inputs=None, outputs=None, random=None):
        if has_computed_default and not isinstance(has_computed_default, str):
            raise TypeError("Expected argument 'has_computed_default' to be a str")
        pulumi.set(__self__, "has_computed_default", has_computed_default)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if inputs and not isinstance(inputs, dict):
            raise TypeError("Expected argument 'inputs' to be a dict")
        pulumi.set(__self__, "inputs", inputs)
        if outputs and not isinstance(outputs, dict):
            raise TypeError("Expected argument 'outputs' to be a dict")
        pulumi.set(__self__, "outputs", outputs)
        if random and not isinstance(random, str):
            raise TypeError("Expected argument 'random' to be a str")
        pulumi.set(__self__, "random", random)

    @property
    @pulumi.getter(name="hasComputedDefault")
    def has_computed_default(self) -> str:
        """
        If set, its literal value will be stored and returned. If not, its value defaults to `"default"`. This argument exists primarily for testing and has little practical use.
        """
        return pulumi.get(self, "has_computed_default")

    @property
    @pulumi.getter
    @_utilities.deprecated("""This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.""")
    def id(self) -> str:
        """
        This attribute is only present for some legacy compatibility issues and should not be used. It will be removed in a future version.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def inputs(self) -> Optional[Mapping[str, str]]:
        """
        A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.
        """
        return pulumi.get(self, "inputs")

    @property
    @pulumi.getter
    def outputs(self) -> Mapping[str, str]:
        """
        After the data source is "read", a copy of the `inputs` map.
        """
        return pulumi.get(self, "outputs")

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


class AwaitableGetDataSourceResult(GetDataSourceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetDataSourceResult(
            has_computed_default=self.has_computed_default,
            id=self.id,
            inputs=self.inputs,
            outputs=self.outputs,
            random=self.random)


def get_data_source(has_computed_default: Optional[str] = None,
                    inputs: Optional[Mapping[str, str]] = None,
                    opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetDataSourceResult:
    """
    ## Example Usage


    :param str has_computed_default: If set, its literal value will be stored and returned. If not, its value defaults to `"default"`. This argument exists primarily for testing and has little practical use.
    :param Mapping[str, str] inputs: A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.
    """
    __args__ = dict()
    __args__['hasComputedDefault'] = has_computed_default
    __args__['inputs'] = inputs
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('null:index/getDataSource:getDataSource', __args__, opts=opts, typ=GetDataSourceResult).value

    return AwaitableGetDataSourceResult(
        has_computed_default=pulumi.get(__ret__, 'has_computed_default'),
        id=pulumi.get(__ret__, 'id'),
        inputs=pulumi.get(__ret__, 'inputs'),
        outputs=pulumi.get(__ret__, 'outputs'),
        random=pulumi.get(__ret__, 'random'))


@_utilities.lift_output_func(get_data_source)
def get_data_source_output(has_computed_default: Optional[pulumi.Input[Optional[str]]] = None,
                           inputs: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
                           opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetDataSourceResult]:
    """
    ## Example Usage


    :param str has_computed_default: If set, its literal value will be stored and returned. If not, its value defaults to `"default"`. This argument exists primarily for testing and has little practical use.
    :param Mapping[str, str] inputs: A map of arbitrary strings that is copied into the `outputs` attribute, and accessible directly for interpolation.
    """
    ...
