# 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__ = ['KnowledgeAssistantArgs', 'KnowledgeAssistant']

@pulumi.input_type
class KnowledgeAssistantArgs:
    def __init__(__self__, *,
                 description: pulumi.Input[_builtins.str],
                 display_name: pulumi.Input[_builtins.str],
                 instructions: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['KnowledgeAssistantProviderConfigArgs']] = None):
        """
        The set of arguments for constructing a KnowledgeAssistant resource.
        :param pulumi.Input[_builtins.str] description: 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
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] instructions: 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
        :param pulumi.Input['KnowledgeAssistantProviderConfigArgs'] provider_config: Configure the provider for management through account provider.
        """
        pulumi.set(__self__, "description", description)
        pulumi.set(__self__, "display_name", display_name)
        if instructions is not None:
            pulumi.set(__self__, "instructions", instructions)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)

    @_builtins.property
    @pulumi.getter
    def description(self) -> pulumi.Input[_builtins.str]:
        """
        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")

    @description.setter
    def description(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Input[_builtins.str]:
        """
        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")

    @display_name.setter
    def display_name(self, value: pulumi.Input[_builtins.str]):
        pulumi.set(self, "display_name", value)

    @_builtins.property
    @pulumi.getter
    def instructions(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        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")

    @instructions.setter
    def instructions(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "instructions", value)

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input['KnowledgeAssistantProviderConfigArgs']]:
        """
        Configure the provider for management through account provider.
        """
        return pulumi.get(self, "provider_config")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input['KnowledgeAssistantProviderConfigArgs']]):
        pulumi.set(self, "provider_config", value)


@pulumi.input_type
class _KnowledgeAssistantState:
    def __init__(__self__, *,
                 create_time: Optional[pulumi.Input[_builtins.str]] = None,
                 creator: Optional[pulumi.Input[_builtins.str]] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 endpoint_name: Optional[pulumi.Input[_builtins.str]] = None,
                 error_info: Optional[pulumi.Input[_builtins.str]] = None,
                 experiment_id: Optional[pulumi.Input[_builtins.str]] = None,
                 instructions: Optional[pulumi.Input[_builtins.str]] = None,
                 name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input['KnowledgeAssistantProviderConfigArgs']] = None,
                 state: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering KnowledgeAssistant resources.
        :param pulumi.Input[_builtins.str] create_time: (string) - Creation timestamp
        :param pulumi.Input[_builtins.str] creator: (string) - The creator of the Knowledge Assistant
        :param pulumi.Input[_builtins.str] description: 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
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] endpoint_name: (string) - The name of the knowledge assistant agent endpoint
        :param pulumi.Input[_builtins.str] error_info: (string) - Error details when the Knowledge Assistant is in FAILED state
        :param pulumi.Input[_builtins.str] experiment_id: (string) - The MLflow experiment ID
        :param pulumi.Input[_builtins.str] instructions: 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
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of the Knowledge Assistant.
               Format: knowledge-assistants/{knowledge_assistant_id}
        :param pulumi.Input['KnowledgeAssistantProviderConfigArgs'] provider_config: Configure the provider for management through account provider.
        :param pulumi.Input[_builtins.str] state: (string) - State of the Knowledge Assistant. Not returned in List responses. Possible values are: `ACTIVE`, `CREATING`, `FAILED`
        """
        if create_time is not None:
            pulumi.set(__self__, "create_time", create_time)
        if creator is not None:
            pulumi.set(__self__, "creator", creator)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if endpoint_name is not None:
            pulumi.set(__self__, "endpoint_name", endpoint_name)
        if error_info is not None:
            pulumi.set(__self__, "error_info", error_info)
        if experiment_id is not None:
            pulumi.set(__self__, "experiment_id", experiment_id)
        if instructions is not None:
            pulumi.set(__self__, "instructions", instructions)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)
        if state is not None:
            pulumi.set(__self__, "state", state)

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (string) - Creation timestamp
        """
        return pulumi.get(self, "create_time")

    @create_time.setter
    def create_time(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "create_time", value)

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

    @creator.setter
    def creator(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "creator", value)

    @_builtins.property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        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")

    @description.setter
    def description(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "description", value)

    @_builtins.property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        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")

    @display_name.setter
    def display_name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "display_name", value)

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

    @endpoint_name.setter
    def endpoint_name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "endpoint_name", value)

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

    @error_info.setter
    def error_info(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "error_info", value)

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

    @experiment_id.setter
    def experiment_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "experiment_id", value)

    @_builtins.property
    @pulumi.getter
    def instructions(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        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")

    @instructions.setter
    def instructions(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "instructions", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "name", value)

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input['KnowledgeAssistantProviderConfigArgs']]:
        """
        Configure the provider for management through account provider.
        """
        return pulumi.get(self, "provider_config")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input['KnowledgeAssistantProviderConfigArgs']]):
        pulumi.set(self, "provider_config", value)

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

    @state.setter
    def state(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "state", value)


@pulumi.type_token("databricks:index/knowledgeAssistant:KnowledgeAssistant")
class KnowledgeAssistant(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 instructions: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['KnowledgeAssistantProviderConfigArgs', 'KnowledgeAssistantProviderConfigArgsDict']]] = None,
                 __props__=None):
        """
        [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] description: 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
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] instructions: 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
        :param pulumi.Input[Union['KnowledgeAssistantProviderConfigArgs', 'KnowledgeAssistantProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: KnowledgeAssistantArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        [![Public Beta](https://img.shields.io/badge/Release_Stage-Public_Beta-orange)](https://docs.databricks.com/aws/en/release-notes/release-types)

        :param str resource_name: The name of the resource.
        :param KnowledgeAssistantArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(KnowledgeAssistantArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[_builtins.str]] = None,
                 display_name: Optional[pulumi.Input[_builtins.str]] = None,
                 instructions: Optional[pulumi.Input[_builtins.str]] = None,
                 provider_config: Optional[pulumi.Input[Union['KnowledgeAssistantProviderConfigArgs', 'KnowledgeAssistantProviderConfigArgsDict']]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = KnowledgeAssistantArgs.__new__(KnowledgeAssistantArgs)

            if description is None and not opts.urn:
                raise TypeError("Missing required property 'description'")
            __props__.__dict__["description"] = description
            if display_name is None and not opts.urn:
                raise TypeError("Missing required property 'display_name'")
            __props__.__dict__["display_name"] = display_name
            __props__.__dict__["instructions"] = instructions
            __props__.__dict__["provider_config"] = provider_config
            __props__.__dict__["create_time"] = None
            __props__.__dict__["creator"] = None
            __props__.__dict__["endpoint_name"] = None
            __props__.__dict__["error_info"] = None
            __props__.__dict__["experiment_id"] = None
            __props__.__dict__["name"] = None
            __props__.__dict__["state"] = None
        super(KnowledgeAssistant, __self__).__init__(
            'databricks:index/knowledgeAssistant:KnowledgeAssistant',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            create_time: Optional[pulumi.Input[_builtins.str]] = None,
            creator: Optional[pulumi.Input[_builtins.str]] = None,
            description: Optional[pulumi.Input[_builtins.str]] = None,
            display_name: Optional[pulumi.Input[_builtins.str]] = None,
            endpoint_name: Optional[pulumi.Input[_builtins.str]] = None,
            error_info: Optional[pulumi.Input[_builtins.str]] = None,
            experiment_id: Optional[pulumi.Input[_builtins.str]] = None,
            instructions: Optional[pulumi.Input[_builtins.str]] = None,
            name: Optional[pulumi.Input[_builtins.str]] = None,
            provider_config: Optional[pulumi.Input[Union['KnowledgeAssistantProviderConfigArgs', 'KnowledgeAssistantProviderConfigArgsDict']]] = None,
            state: Optional[pulumi.Input[_builtins.str]] = None) -> 'KnowledgeAssistant':
        """
        Get an existing KnowledgeAssistant resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] create_time: (string) - Creation timestamp
        :param pulumi.Input[_builtins.str] creator: (string) - The creator of the Knowledge Assistant
        :param pulumi.Input[_builtins.str] description: 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
        :param pulumi.Input[_builtins.str] display_name: 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
        :param pulumi.Input[_builtins.str] endpoint_name: (string) - The name of the knowledge assistant agent endpoint
        :param pulumi.Input[_builtins.str] error_info: (string) - Error details when the Knowledge Assistant is in FAILED state
        :param pulumi.Input[_builtins.str] experiment_id: (string) - The MLflow experiment ID
        :param pulumi.Input[_builtins.str] instructions: 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
        :param pulumi.Input[_builtins.str] name: (string) - The resource name of the Knowledge Assistant.
               Format: knowledge-assistants/{knowledge_assistant_id}
        :param pulumi.Input[Union['KnowledgeAssistantProviderConfigArgs', 'KnowledgeAssistantProviderConfigArgsDict']] provider_config: Configure the provider for management through account provider.
        :param pulumi.Input[_builtins.str] state: (string) - State of the Knowledge Assistant. Not returned in List responses. Possible values are: `ACTIVE`, `CREATING`, `FAILED`
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _KnowledgeAssistantState.__new__(_KnowledgeAssistantState)

        __props__.__dict__["create_time"] = create_time
        __props__.__dict__["creator"] = creator
        __props__.__dict__["description"] = description
        __props__.__dict__["display_name"] = display_name
        __props__.__dict__["endpoint_name"] = endpoint_name
        __props__.__dict__["error_info"] = error_info
        __props__.__dict__["experiment_id"] = experiment_id
        __props__.__dict__["instructions"] = instructions
        __props__.__dict__["name"] = name
        __props__.__dict__["provider_config"] = provider_config
        __props__.__dict__["state"] = state
        return KnowledgeAssistant(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="createTime")
    def create_time(self) -> pulumi.Output[_builtins.str]:
        """
        (string) - Creation timestamp
        """
        return pulumi.get(self, "create_time")

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

    @_builtins.property
    @pulumi.getter
    def description(self) -> pulumi.Output[_builtins.str]:
        """
        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) -> pulumi.Output[_builtins.str]:
        """
        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) -> pulumi.Output[_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) -> pulumi.Output[_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) -> pulumi.Output[_builtins.str]:
        """
        (string) - The MLflow experiment ID
        """
        return pulumi.get(self, "experiment_id")

    @_builtins.property
    @pulumi.getter
    def instructions(self) -> pulumi.Output[Optional[_builtins.str]]:
        """
        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) -> pulumi.Output[_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) -> pulumi.Output[Optional['outputs.KnowledgeAssistantProviderConfig']]:
        """
        Configure the provider for management through account provider.
        """
        return pulumi.get(self, "provider_config")

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

