# Copyright (c) 2012-2024, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***


from . import AWSObject, AWSProperty, PropsDictType, Tags
from .validators import boolean, double, integer


class S3Identifier(AWSProperty):
    """
    `S3Identifier <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-s3identifier.html>`__
    """

    props: PropsDictType = {
        "S3BucketName": (str, False),
        "S3ObjectKey": (str, False),
    }


class APISchema(AWSProperty):
    """
    `APISchema <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-apischema.html>`__
    """

    props: PropsDictType = {
        "Payload": (str, False),
        "S3": (S3Identifier, False),
    }


class ActionGroupExecutor(AWSProperty):
    """
    `ActionGroupExecutor <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-actiongroupexecutor.html>`__
    """

    props: PropsDictType = {
        "Lambda": (str, True),
    }


class AgentActionGroup(AWSProperty):
    """
    `AgentActionGroup <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentactiongroup.html>`__
    """

    props: PropsDictType = {
        "ActionGroupExecutor": (ActionGroupExecutor, False),
        "ActionGroupName": (str, True),
        "ActionGroupState": (str, False),
        "ApiSchema": (APISchema, False),
        "Description": (str, False),
        "ParentActionGroupSignature": (str, False),
        "SkipResourceInUseCheckOnDelete": (boolean, False),
    }


class AgentKnowledgeBase(AWSProperty):
    """
    `AgentKnowledgeBase <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-agentknowledgebase.html>`__
    """

    props: PropsDictType = {
        "Description": (str, True),
        "KnowledgeBaseId": (str, True),
        "KnowledgeBaseState": (str, False),
    }


class InferenceConfiguration(AWSProperty):
    """
    `InferenceConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-inferenceconfiguration.html>`__
    """

    props: PropsDictType = {
        "MaximumLength": (double, False),
        "StopSequences": ([str], False),
        "Temperature": (double, False),
        "TopK": (double, False),
        "TopP": (double, False),
    }


class PromptConfiguration(AWSProperty):
    """
    `PromptConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptconfiguration.html>`__
    """

    props: PropsDictType = {
        "BasePromptTemplate": (str, False),
        "InferenceConfiguration": (InferenceConfiguration, False),
        "ParserMode": (str, False),
        "PromptCreationMode": (str, False),
        "PromptState": (str, False),
        "PromptType": (str, False),
    }


class PromptOverrideConfiguration(AWSProperty):
    """
    `PromptOverrideConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agent-promptoverrideconfiguration.html>`__
    """

    props: PropsDictType = {
        "OverrideLambda": (str, False),
        "PromptConfigurations": ([PromptConfiguration], True),
    }


class Agent(AWSObject):
    """
    `Agent <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agent.html>`__
    """

    resource_type = "AWS::Bedrock::Agent"

    props: PropsDictType = {
        "ActionGroups": ([AgentActionGroup], False),
        "AgentName": (str, True),
        "AgentResourceRoleArn": (str, False),
        "AutoPrepare": (boolean, False),
        "CustomerEncryptionKeyArn": (str, False),
        "Description": (str, False),
        "FoundationModel": (str, False),
        "IdleSessionTTLInSeconds": (double, False),
        "Instruction": (str, False),
        "KnowledgeBases": ([AgentKnowledgeBase], False),
        "PromptOverrideConfiguration": (PromptOverrideConfiguration, False),
        "SkipResourceInUseCheckOnDelete": (boolean, False),
        "Tags": (dict, False),
        "TestAliasTags": (dict, False),
    }


class AgentAliasRoutingConfigurationListItem(AWSProperty):
    """
    `AgentAliasRoutingConfigurationListItem <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agentalias-agentaliasroutingconfigurationlistitem.html>`__
    """

    props: PropsDictType = {
        "AgentVersion": (str, True),
    }


class AgentAlias(AWSObject):
    """
    `AgentAlias <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-agentalias.html>`__
    """

    resource_type = "AWS::Bedrock::AgentAlias"

    props: PropsDictType = {
        "AgentAliasName": (str, True),
        "AgentId": (str, True),
        "Description": (str, False),
        "RoutingConfiguration": ([AgentAliasRoutingConfigurationListItem], False),
        "Tags": (dict, False),
    }


class S3DataSourceConfiguration(AWSProperty):
    """
    `S3DataSourceConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-s3datasourceconfiguration.html>`__
    """

    props: PropsDictType = {
        "BucketArn": (str, True),
        "InclusionPrefixes": ([str], False),
    }


class DataSourceConfiguration(AWSProperty):
    """
    `DataSourceConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-datasourceconfiguration.html>`__
    """

    props: PropsDictType = {
        "S3Configuration": (S3DataSourceConfiguration, True),
        "Type": (str, True),
    }


class ServerSideEncryptionConfiguration(AWSProperty):
    """
    `ServerSideEncryptionConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-serversideencryptionconfiguration.html>`__
    """

    props: PropsDictType = {
        "KmsKeyArn": (str, False),
    }


class FixedSizeChunkingConfiguration(AWSProperty):
    """
    `FixedSizeChunkingConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-fixedsizechunkingconfiguration.html>`__
    """

    props: PropsDictType = {
        "MaxTokens": (integer, True),
        "OverlapPercentage": (integer, True),
    }


class ChunkingConfiguration(AWSProperty):
    """
    `ChunkingConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-chunkingconfiguration.html>`__
    """

    props: PropsDictType = {
        "ChunkingStrategy": (str, True),
        "FixedSizeChunkingConfiguration": (FixedSizeChunkingConfiguration, False),
    }


class VectorIngestionConfiguration(AWSProperty):
    """
    `VectorIngestionConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-datasource-vectoringestionconfiguration.html>`__
    """

    props: PropsDictType = {
        "ChunkingConfiguration": (ChunkingConfiguration, False),
    }


class DataSource(AWSObject):
    """
    `DataSource <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-datasource.html>`__
    """

    resource_type = "AWS::Bedrock::DataSource"

    props: PropsDictType = {
        "DataSourceConfiguration": (DataSourceConfiguration, True),
        "Description": (str, False),
        "KnowledgeBaseId": (str, True),
        "Name": (str, True),
        "ServerSideEncryptionConfiguration": (ServerSideEncryptionConfiguration, False),
        "VectorIngestionConfiguration": (VectorIngestionConfiguration, False),
    }


class ContentFilterConfig(AWSProperty):
    """
    `ContentFilterConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-contentfilterconfig.html>`__
    """

    props: PropsDictType = {
        "InputStrength": (str, True),
        "OutputStrength": (str, True),
        "Type": (str, True),
    }


class ContentPolicyConfig(AWSProperty):
    """
    `ContentPolicyConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-contentpolicyconfig.html>`__
    """

    props: PropsDictType = {
        "FiltersConfig": ([ContentFilterConfig], True),
    }


class PiiEntityConfig(AWSProperty):
    """
    `PiiEntityConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-piientityconfig.html>`__
    """

    props: PropsDictType = {
        "Action": (str, True),
        "Type": (str, True),
    }


class RegexConfig(AWSProperty):
    """
    `RegexConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-regexconfig.html>`__
    """

    props: PropsDictType = {
        "Action": (str, True),
        "Description": (str, False),
        "Name": (str, True),
        "Pattern": (str, True),
    }


class SensitiveInformationPolicyConfig(AWSProperty):
    """
    `SensitiveInformationPolicyConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-sensitiveinformationpolicyconfig.html>`__
    """

    props: PropsDictType = {
        "PiiEntitiesConfig": ([PiiEntityConfig], False),
        "RegexesConfig": ([RegexConfig], False),
    }


class TopicConfig(AWSProperty):
    """
    `TopicConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-topicconfig.html>`__
    """

    props: PropsDictType = {
        "Definition": (str, True),
        "Examples": ([str], False),
        "Name": (str, True),
        "Type": (str, True),
    }


class TopicPolicyConfig(AWSProperty):
    """
    `TopicPolicyConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-topicpolicyconfig.html>`__
    """

    props: PropsDictType = {
        "TopicsConfig": ([TopicConfig], True),
    }


class ManagedWordsConfig(AWSProperty):
    """
    `ManagedWordsConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-managedwordsconfig.html>`__
    """

    props: PropsDictType = {
        "Type": (str, True),
    }


class WordConfig(AWSProperty):
    """
    `WordConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-wordconfig.html>`__
    """

    props: PropsDictType = {
        "Text": (str, True),
    }


class WordPolicyConfig(AWSProperty):
    """
    `WordPolicyConfig <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-guardrail-wordpolicyconfig.html>`__
    """

    props: PropsDictType = {
        "ManagedWordListsConfig": ([ManagedWordsConfig], False),
        "WordsConfig": ([WordConfig], False),
    }


class Guardrail(AWSObject):
    """
    `Guardrail <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-guardrail.html>`__
    """

    resource_type = "AWS::Bedrock::Guardrail"

    props: PropsDictType = {
        "BlockedInputMessaging": (str, True),
        "BlockedOutputsMessaging": (str, True),
        "ContentPolicyConfig": (ContentPolicyConfig, False),
        "Description": (str, False),
        "KmsKeyArn": (str, False),
        "Name": (str, True),
        "SensitiveInformationPolicyConfig": (SensitiveInformationPolicyConfig, False),
        "Tags": (Tags, False),
        "TopicPolicyConfig": (TopicPolicyConfig, False),
        "WordPolicyConfig": (WordPolicyConfig, False),
    }


class VectorKnowledgeBaseConfiguration(AWSProperty):
    """
    `VectorKnowledgeBaseConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-vectorknowledgebaseconfiguration.html>`__
    """

    props: PropsDictType = {
        "EmbeddingModelArn": (str, True),
    }


class KnowledgeBaseConfiguration(AWSProperty):
    """
    `KnowledgeBaseConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html>`__
    """

    props: PropsDictType = {
        "Type": (str, True),
        "VectorKnowledgeBaseConfiguration": (VectorKnowledgeBaseConfiguration, True),
    }


class OpenSearchServerlessFieldMapping(AWSProperty):
    """
    `OpenSearchServerlessFieldMapping <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessfieldmapping.html>`__
    """

    props: PropsDictType = {
        "MetadataField": (str, True),
        "TextField": (str, True),
        "VectorField": (str, True),
    }


class OpenSearchServerlessConfiguration(AWSProperty):
    """
    `OpenSearchServerlessConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessconfiguration.html>`__
    """

    props: PropsDictType = {
        "CollectionArn": (str, True),
        "FieldMapping": (OpenSearchServerlessFieldMapping, True),
        "VectorIndexName": (str, True),
    }


class PineconeFieldMapping(AWSProperty):
    """
    `PineconeFieldMapping <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconefieldmapping.html>`__
    """

    props: PropsDictType = {
        "MetadataField": (str, True),
        "TextField": (str, True),
    }


class PineconeConfiguration(AWSProperty):
    """
    `PineconeConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconeconfiguration.html>`__
    """

    props: PropsDictType = {
        "ConnectionString": (str, True),
        "CredentialsSecretArn": (str, True),
        "FieldMapping": (PineconeFieldMapping, True),
        "Namespace": (str, False),
    }


class RdsFieldMapping(AWSProperty):
    """
    `RdsFieldMapping <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsfieldmapping.html>`__
    """

    props: PropsDictType = {
        "MetadataField": (str, True),
        "PrimaryKeyField": (str, True),
        "TextField": (str, True),
        "VectorField": (str, True),
    }


class RdsConfiguration(AWSProperty):
    """
    `RdsConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html>`__
    """

    props: PropsDictType = {
        "CredentialsSecretArn": (str, True),
        "DatabaseName": (str, True),
        "FieldMapping": (RdsFieldMapping, True),
        "ResourceArn": (str, True),
        "TableName": (str, True),
    }


class StorageConfiguration(AWSProperty):
    """
    `StorageConfiguration <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-storageconfiguration.html>`__
    """

    props: PropsDictType = {
        "OpensearchServerlessConfiguration": (OpenSearchServerlessConfiguration, False),
        "PineconeConfiguration": (PineconeConfiguration, False),
        "RdsConfiguration": (RdsConfiguration, False),
        "Type": (str, True),
    }


class KnowledgeBase(AWSObject):
    """
    `KnowledgeBase <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-knowledgebase.html>`__
    """

    resource_type = "AWS::Bedrock::KnowledgeBase"

    props: PropsDictType = {
        "Description": (str, False),
        "KnowledgeBaseConfiguration": (KnowledgeBaseConfiguration, True),
        "Name": (str, True),
        "RoleArn": (str, True),
        "StorageConfiguration": (StorageConfiguration, True),
        "Tags": (dict, False),
    }


class AgentAliasHistoryEvent(AWSProperty):
    """
    `AgentAliasHistoryEvent <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-agentalias-agentaliashistoryevent.html>`__
    """

    props: PropsDictType = {
        "EndDate": (str, False),
        "RoutingConfiguration": ([AgentAliasRoutingConfigurationListItem], False),
        "StartDate": (str, False),
    }
