# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from . import _utilities
from . import outputs

__all__ = [
    'GetGenaiKnowledgeBaseDataSourcesResult',
    'AwaitableGetGenaiKnowledgeBaseDataSourcesResult',
    'get_genai_knowledge_base_data_sources',
    'get_genai_knowledge_base_data_sources_output',
]

@pulumi.output_type
class GetGenaiKnowledgeBaseDataSourcesResult:
    """
    A collection of values returned by getGenaiKnowledgeBaseDataSources.
    """
    def __init__(__self__, datasources=None, id=None, knowledge_base_uuid=None):
        if datasources and not isinstance(datasources, list):
            raise TypeError("Expected argument 'datasources' to be a list")
        pulumi.set(__self__, "datasources", datasources)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if knowledge_base_uuid and not isinstance(knowledge_base_uuid, str):
            raise TypeError("Expected argument 'knowledge_base_uuid' to be a str")
        pulumi.set(__self__, "knowledge_base_uuid", knowledge_base_uuid)

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

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="knowledgeBaseUuid")
    def knowledge_base_uuid(self) -> _builtins.str:
        return pulumi.get(self, "knowledge_base_uuid")


class AwaitableGetGenaiKnowledgeBaseDataSourcesResult(GetGenaiKnowledgeBaseDataSourcesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGenaiKnowledgeBaseDataSourcesResult(
            datasources=self.datasources,
            id=self.id,
            knowledge_base_uuid=self.knowledge_base_uuid)


def get_genai_knowledge_base_data_sources(knowledge_base_uuid: Optional[_builtins.str] = None,
                                          opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGenaiKnowledgeBaseDataSourcesResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['knowledgeBaseUuid'] = knowledge_base_uuid
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getGenaiKnowledgeBaseDataSources:getGenaiKnowledgeBaseDataSources', __args__, opts=opts, typ=GetGenaiKnowledgeBaseDataSourcesResult).value

    return AwaitableGetGenaiKnowledgeBaseDataSourcesResult(
        datasources=pulumi.get(__ret__, 'datasources'),
        id=pulumi.get(__ret__, 'id'),
        knowledge_base_uuid=pulumi.get(__ret__, 'knowledge_base_uuid'))
def get_genai_knowledge_base_data_sources_output(knowledge_base_uuid: Optional[pulumi.Input[_builtins.str]] = None,
                                                 opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGenaiKnowledgeBaseDataSourcesResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['knowledgeBaseUuid'] = knowledge_base_uuid
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getGenaiKnowledgeBaseDataSources:getGenaiKnowledgeBaseDataSources', __args__, opts=opts, typ=GetGenaiKnowledgeBaseDataSourcesResult)
    return __ret__.apply(lambda __response__: GetGenaiKnowledgeBaseDataSourcesResult(
        datasources=pulumi.get(__response__, 'datasources'),
        id=pulumi.get(__response__, 'id'),
        knowledge_base_uuid=pulumi.get(__response__, 'knowledge_base_uuid')))
