# 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__ = [
    'GetKnowledgeAssistantResult',
    'AwaitableGetKnowledgeAssistantResult',
    'get_knowledge_assistant',
    'get_knowledge_assistant_output',
]

@pulumi.output_type
class GetKnowledgeAssistantResult:
    """
    A collection of values returned by getKnowledgeAssistant.
    """
    def __init__(__self__, create_time=None, creator=None, description=None, display_name=None, endpoint_name=None, error_info=None, experiment_id=None, id=None, instructions=None, name=None, provider_config=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 creator and not isinstance(creator, str):
            raise TypeError("Expected argument 'creator' to be a str")
        pulumi.set(__self__, "creator", creator)
        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 endpoint_name and not isinstance(endpoint_name, str):
            raise TypeError("Expected argument 'endpoint_name' to be a str")
        pulumi.set(__self__, "endpoint_name", endpoint_name)
        if error_info and not isinstance(error_info, str):
            raise TypeError("Expected argument 'error_info' to be a str")
        pulumi.set(__self__, "error_info", error_info)
        if experiment_id and not isinstance(experiment_id, str):
            raise TypeError("Expected argument 'experiment_id' to be a str")
        pulumi.set(__self__, "experiment_id", experiment_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instructions and not isinstance(instructions, str):
            raise TypeError("Expected argument 'instructions' to be a str")
        pulumi.set(__self__, "instructions", instructions)
        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 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) - Creation timestamp
        """
        return pulumi.get(self, "create_time")

    @_builtins.property
    @pulumi.getter
    def creator(self) -> _builtins.str:
        """
        (string) - The creator of the Knowledge Assistant
        """
        return pulumi.get(self, "creator")

    @_builtins.property
    @pulumi.getter
    def description(self) -> _builtins.str:
        """
        (string) - Description of what this agent can do (user-facing).
        Required when creating a Knowledge Assistant.
        When updating a Knowledge Assistant, optional unless included in
        update_mask
        """
        return pulumi.get(self, "description")

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> _builtins.str:
        """
        (string) - The display name of the Knowledge Assistant, unique at workspace level.
        Required when creating a Knowledge Assistant.
        When updating a Knowledge Assistant, optional unless included in
        update_mask
        """
        return pulumi.get(self, "display_name")

    @_builtins.property
    @pulumi.getter(name="endpointName")
    def endpoint_name(self) -> _builtins.str:
        """
        (string) - The name of the knowledge assistant agent endpoint
        """
        return pulumi.get(self, "endpoint_name")

    @_builtins.property
    @pulumi.getter(name="errorInfo")
    def error_info(self) -> _builtins.str:
        """
        (string) - Error details when the Knowledge Assistant is in FAILED state
        """
        return pulumi.get(self, "error_info")

    @_builtins.property
    @pulumi.getter(name="experimentId")
    def experiment_id(self) -> _builtins.str:
        """
        (string) - The MLflow experiment ID
        """
        return pulumi.get(self, "experiment_id")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        (string) - The universally unique identifier (UUID) of the Knowledge Assistant
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter
    def instructions(self) -> _builtins.str:
        """
        (string) - Additional global instructions on how the agent should generate answers.
        Optional on create and update.
        When updating a Knowledge Assistant, include this field in update_mask to
        modify it
        """
        return pulumi.get(self, "instructions")

    @_builtins.property
    @pulumi.getter
    def name(self) -> _builtins.str:
        """
        (string) - The resource name of the Knowledge Assistant.
        Format: knowledge-assistants/{knowledge_assistant_id}
        """
        return pulumi.get(self, "name")

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

    @_builtins.property
    @pulumi.getter
    def state(self) -> _builtins.str:
        """
        (string) - State of the Knowledge Assistant. Not returned in List responses. Possible values are: `ACTIVE`, `CREATING`, `FAILED`
        """
        return pulumi.get(self, "state")


class AwaitableGetKnowledgeAssistantResult(GetKnowledgeAssistantResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetKnowledgeAssistantResult(
            create_time=self.create_time,
            creator=self.creator,
            description=self.description,
            display_name=self.display_name,
            endpoint_name=self.endpoint_name,
            error_info=self.error_info,
            experiment_id=self.experiment_id,
            id=self.id,
            instructions=self.instructions,
            name=self.name,
            provider_config=self.provider_config,
            state=self.state)


def get_knowledge_assistant(name: Optional[_builtins.str] = None,
                            provider_config: Optional[Union['GetKnowledgeAssistantProviderConfigArgs', 'GetKnowledgeAssistantProviderConfigArgsDict']] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKnowledgeAssistantResult:
    """
    [![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: The resource name of the Knowledge Assistant.
           Format: knowledge-assistants/{knowledge_assistant_id}
    :param Union['GetKnowledgeAssistantProviderConfigArgs', 'GetKnowledgeAssistantProviderConfigArgsDict'] 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/getKnowledgeAssistant:getKnowledgeAssistant', __args__, opts=opts, typ=GetKnowledgeAssistantResult).value

    return AwaitableGetKnowledgeAssistantResult(
        create_time=pulumi.get(__ret__, 'create_time'),
        creator=pulumi.get(__ret__, 'creator'),
        description=pulumi.get(__ret__, 'description'),
        display_name=pulumi.get(__ret__, 'display_name'),
        endpoint_name=pulumi.get(__ret__, 'endpoint_name'),
        error_info=pulumi.get(__ret__, 'error_info'),
        experiment_id=pulumi.get(__ret__, 'experiment_id'),
        id=pulumi.get(__ret__, 'id'),
        instructions=pulumi.get(__ret__, 'instructions'),
        name=pulumi.get(__ret__, 'name'),
        provider_config=pulumi.get(__ret__, 'provider_config'),
        state=pulumi.get(__ret__, 'state'))
def get_knowledge_assistant_output(name: Optional[pulumi.Input[_builtins.str]] = None,
                                   provider_config: Optional[pulumi.Input[Optional[Union['GetKnowledgeAssistantProviderConfigArgs', 'GetKnowledgeAssistantProviderConfigArgsDict']]]] = None,
                                   opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKnowledgeAssistantResult]:
    """
    [![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: The resource name of the Knowledge Assistant.
           Format: knowledge-assistants/{knowledge_assistant_id}
    :param Union['GetKnowledgeAssistantProviderConfigArgs', 'GetKnowledgeAssistantProviderConfigArgsDict'] 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/getKnowledgeAssistant:getKnowledgeAssistant', __args__, opts=opts, typ=GetKnowledgeAssistantResult)
    return __ret__.apply(lambda __response__: GetKnowledgeAssistantResult(
        create_time=pulumi.get(__response__, 'create_time'),
        creator=pulumi.get(__response__, 'creator'),
        description=pulumi.get(__response__, 'description'),
        display_name=pulumi.get(__response__, 'display_name'),
        endpoint_name=pulumi.get(__response__, 'endpoint_name'),
        error_info=pulumi.get(__response__, 'error_info'),
        experiment_id=pulumi.get(__response__, 'experiment_id'),
        id=pulumi.get(__response__, 'id'),
        instructions=pulumi.get(__response__, 'instructions'),
        name=pulumi.get(__response__, 'name'),
        provider_config=pulumi.get(__response__, 'provider_config'),
        state=pulumi.get(__response__, 'state')))
