# 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
from ._inputs import *

__all__ = [
    'GetGenaiKnowledgeBasesResult',
    'AwaitableGetGenaiKnowledgeBasesResult',
    'get_genai_knowledge_bases',
    'get_genai_knowledge_bases_output',
]

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

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

    @_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="knowledgeBases")
    def knowledge_bases(self) -> Sequence['outputs.GetGenaiKnowledgeBasesKnowledgeBaseResult']:
        return pulumi.get(self, "knowledge_bases")

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


class AwaitableGetGenaiKnowledgeBasesResult(GetGenaiKnowledgeBasesResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetGenaiKnowledgeBasesResult(
            filters=self.filters,
            id=self.id,
            knowledge_bases=self.knowledge_bases,
            sorts=self.sorts)


def get_genai_knowledge_bases(filters: Optional[Sequence[Union['GetGenaiKnowledgeBasesFilterArgs', 'GetGenaiKnowledgeBasesFilterArgsDict']]] = None,
                              sorts: Optional[Sequence[Union['GetGenaiKnowledgeBasesSortArgs', 'GetGenaiKnowledgeBasesSortArgsDict']]] = None,
                              opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGenaiKnowledgeBasesResult:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['sorts'] = sorts
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('digitalocean:index/getGenaiKnowledgeBases:getGenaiKnowledgeBases', __args__, opts=opts, typ=GetGenaiKnowledgeBasesResult).value

    return AwaitableGetGenaiKnowledgeBasesResult(
        filters=pulumi.get(__ret__, 'filters'),
        id=pulumi.get(__ret__, 'id'),
        knowledge_bases=pulumi.get(__ret__, 'knowledge_bases'),
        sorts=pulumi.get(__ret__, 'sorts'))
def get_genai_knowledge_bases_output(filters: Optional[pulumi.Input[Optional[Sequence[Union['GetGenaiKnowledgeBasesFilterArgs', 'GetGenaiKnowledgeBasesFilterArgsDict']]]]] = None,
                                     sorts: Optional[pulumi.Input[Optional[Sequence[Union['GetGenaiKnowledgeBasesSortArgs', 'GetGenaiKnowledgeBasesSortArgsDict']]]]] = None,
                                     opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGenaiKnowledgeBasesResult]:
    """
    Use this data source to access information about an existing resource.
    """
    __args__ = dict()
    __args__['filters'] = filters
    __args__['sorts'] = sorts
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('digitalocean:index/getGenaiKnowledgeBases:getGenaiKnowledgeBases', __args__, opts=opts, typ=GetGenaiKnowledgeBasesResult)
    return __ret__.apply(lambda __response__: GetGenaiKnowledgeBasesResult(
        filters=pulumi.get(__response__, 'filters'),
        id=pulumi.get(__response__, 'id'),
        knowledge_bases=pulumi.get(__response__, 'knowledge_bases'),
        sorts=pulumi.get(__response__, 'sorts')))
