# 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__ = [
    'GetKnowledgeAssistantKnowledgeSourceResult',
    'AwaitableGetKnowledgeAssistantKnowledgeSourceResult',
    'get_knowledge_assistant_knowledge_source',
    'get_knowledge_assistant_knowledge_source_output',
]

@pulumi.output_type
class GetKnowledgeAssistantKnowledgeSourceResult:
    """
    A collection of values returned by getKnowledgeAssistantKnowledgeSource.
    """
    def __init__(__self__, create_time=None, description=None, display_name=None, file_table=None, files=None, id=None, index=None, knowledge_cutoff_time=None, name=None, provider_config=None, source_type=None, state=None):
        if create_time and not isinstance(create_time, str):
            raise TypeError("Expected argument 'create_time' to be a str")
        pulumi.set(__self__, "create_time", create_time)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if display_name and not isinstance(display_name, str):
            raise TypeError("Expected argument 'display_name' to be a str")
        pulumi.set(__self__, "display_name", display_name)
        if file_table and not isinstance(file_table, dict):
            raise TypeError("Expected argument 'file_table' to be a dict")
        pulumi.set(__self__, "file_table", file_table)
        if files and not isinstance(files, dict):
            raise TypeError("Expected argument 'files' to be a dict")
        pulumi.set(__self__, "files", files)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if index and not isinstance(index, dict):
            raise TypeError("Expected argument 'index' to be a dict")
        pulumi.set(__self__, "index", index)
        if knowledge_cutoff_time and not isinstance(knowledge_cutoff_time, str):
            raise TypeError("Expected argument 'knowledge_cutoff_time' to be a str")
        pulumi.set(__self__, "knowledge_cutoff_time", knowledge_cutoff_time)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if provider_config and not isinstance(provider_config, dict):
            raise TypeError("Expected argument 'provider_config' to be a dict")
        pulumi.set(__self__, "provider_config", provider_config)
        if source_type and not isinstance(source_type, str):
            raise TypeError("Expected argument 'source_type' to be a str")
        pulumi.set(__self__, "source_type", source_type)
        if state and not isinstance(state, str):
            raise TypeError("Expected argument 'state' to be a str")
        pulumi.set(__self__, "state", state)

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> _builtins.str:
        """
        (string) - Timestamp when this knowledge source was created
        """
        return pulumi.get(self, "create_time")

    @_builtins.property
    @pulumi.getter
    def description(self) -> _builtins.str:
        """
        (string) - Description of the knowledge source.
        Required when creating a Knowledge Source.
        When updating a Knowledge Source, optional unless included in update_mask
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> _builtins.str:
        """
        (string) - Human-readable display name of the knowledge source.
        Required when creating a Knowledge Source.
        When updating a Knowledge Source, optional unless included in update_mask
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter(name="fileTable")
    def file_table(self) -> 'outputs.GetKnowledgeAssistantKnowledgeSourceFileTableResult':
        """
        (FileTableSpec)
        """
        return pulumi.get(self, "file_table")

    @_builtins.property
    @pulumi.getter
    def files(self) -> 'outputs.GetKnowledgeAssistantKnowledgeSourceFilesResult':
        """
        (FilesSpec)
        """
        return pulumi.get(self, "files")

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

    @_builtins.property
    @pulumi.getter
    def index(self) -> 'outputs.GetKnowledgeAssistantKnowledgeSourceIndexResult':
        """
        (IndexSpec)
        """
        return pulumi.get(self, "index")

    @_builtins.property
    @pulumi.getter(name="knowledgeCutoffTime")
    def knowledge_cutoff_time(self) -> _builtins.str:
        """
        (string) - Timestamp representing the cutoff before which content in this knowledge source is being ingested
        """
        return pulumi.get(self, "knowledge_cutoff_time")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        (string) - Full resource name:
        knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}
        """
        return pulumi.get(self, "name")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional['outputs.GetKnowledgeAssistantKnowledgeSourceProviderConfigResult']:
        return pulumi.get(self, "provider_config")

    @_builtins.property
    @pulumi.getter(name="sourceType")
    def source_type(self) -> _builtins.str:
        """
        (string) - The type of the source: "index", "files", or "file_table".
        Required when creating a Knowledge Source.
        When updating a Knowledge Source, this field is ignored
        """
        return pulumi.get(self, "source_type")

    @_builtins.property
    @pulumi.getter
    def state(self) -> _builtins.str:
        """
        (string) - Possible values are: `FAILED_UPDATE`, `UPDATED`, `UPDATING`
        """
        return pulumi.get(self, "state")


class AwaitableGetKnowledgeAssistantKnowledgeSourceResult(GetKnowledgeAssistantKnowledgeSourceResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKnowledgeAssistantKnowledgeSourceResult(
            create_time=self.create_time,
            description=self.description,
            display_name=self.display_name,
            file_table=self.file_table,
            files=self.files,
            id=self.id,
            index=self.index,
            knowledge_cutoff_time=self.knowledge_cutoff_time,
            name=self.name,
            provider_config=self.provider_config,
            source_type=self.source_type,
            state=self.state)


def get_knowledge_assistant_knowledge_source(name: Optional[_builtins.str] = None,
                                             provider_config: Optional[Union['GetKnowledgeAssistantKnowledgeSourceProviderConfigArgs', 'GetKnowledgeAssistantKnowledgeSourceProviderConfigArgsDict']] = None,
                                             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKnowledgeAssistantKnowledgeSourceResult:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)


    :param _builtins.str name: Full resource name:
           knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}
    :param Union['GetKnowledgeAssistantKnowledgeSourceProviderConfigArgs', 'GetKnowledgeAssistantKnowledgeSourceProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('databricks:index/getKnowledgeAssistantKnowledgeSource:getKnowledgeAssistantKnowledgeSource', __args__, opts=opts, typ=GetKnowledgeAssistantKnowledgeSourceResult).value

    return AwaitableGetKnowledgeAssistantKnowledgeSourceResult(
        create_time=pulumi.get(__ret__, 'create_time'),
        description=pulumi.get(__ret__, 'description'),
        display_name=pulumi.get(__ret__, 'display_name'),
        file_table=pulumi.get(__ret__, 'file_table'),
        files=pulumi.get(__ret__, 'files'),
        id=pulumi.get(__ret__, 'id'),
        index=pulumi.get(__ret__, 'index'),
        knowledge_cutoff_time=pulumi.get(__ret__, 'knowledge_cutoff_time'),
        name=pulumi.get(__ret__, 'name'),
        provider_config=pulumi.get(__ret__, 'provider_config'),
        source_type=pulumi.get(__ret__, 'source_type'),
        state=pulumi.get(__ret__, 'state'))
def get_knowledge_assistant_knowledge_source_output(name: Optional[pulumi.Input[_builtins.str]] = None,
                                                    provider_config: Optional[pulumi.Input[Optional[Union['GetKnowledgeAssistantKnowledgeSourceProviderConfigArgs', 'GetKnowledgeAssistantKnowledgeSourceProviderConfigArgsDict']]]] = None,
                                                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKnowledgeAssistantKnowledgeSourceResult]:
    """
    [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)


    :param _builtins.str name: Full resource name:
           knowledge-assistants/{knowledge_assistant_id}/knowledge-sources/{knowledge_source_id}
    :param Union['GetKnowledgeAssistantKnowledgeSourceProviderConfigArgs', 'GetKnowledgeAssistantKnowledgeSourceProviderConfigArgsDict'] provider_config: Configure the provider for management through account provider.
    """
    __args__ = dict()
    __args__['name'] = name
    __args__['providerConfig'] = provider_config
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('databricks:index/getKnowledgeAssistantKnowledgeSource:getKnowledgeAssistantKnowledgeSource', __args__, opts=opts, typ=GetKnowledgeAssistantKnowledgeSourceResult)
    return __ret__.apply(lambda __response__: GetKnowledgeAssistantKnowledgeSourceResult(
        create_time=pulumi.get(__response__, 'create_time'),
        description=pulumi.get(__response__, 'description'),
        display_name=pulumi.get(__response__, 'display_name'),
        file_table=pulumi.get(__response__, 'file_table'),
        files=pulumi.get(__response__, 'files'),
        id=pulumi.get(__response__, 'id'),
        index=pulumi.get(__response__, 'index'),
        knowledge_cutoff_time=pulumi.get(__response__, 'knowledge_cutoff_time'),
        name=pulumi.get(__response__, 'name'),
        provider_config=pulumi.get(__response__, 'provider_config'),
        source_type=pulumi.get(__response__, 'source_type'),
        state=pulumi.get(__response__, 'state')))
