# Code generated by smithy-python-codegen DO NOT EDIT.

from types import MappingProxyType

from smithy_core.prelude import (
    BLOB,
    BOOLEAN,
    DOCUMENT,
    DOUBLE,
    FLOAT,
    INTEGER,
    LONG,
    STRING,
    UNIT,
)
from smithy_core.schemas import Schema
from smithy_core.shapes import ShapeID, ShapeType
from smithy_core.traits import Trait


NON_BLANK_STRING = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#NonBlankString"),
    shape_type=ShapeType.STRING,
    traits=[Trait.new(id=ShapeID("smithy.api#pattern"), value="^[\\s\\S]*$")],
)

ACCESS_DENIED_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AccessDeniedException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=403),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

ACCOUNT_ID = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AccountId"),
    shape_type=ShapeType.STRING,
    traits=[Trait.new(id=ShapeID("smithy.api#pattern"), value="^[0-9]{12}$")],
)

ADDITIONAL_MODEL_RESPONSE_FIELD_PATHS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AdditionalModelResponseFieldPaths"),
    shape_type=ShapeType.LIST,
    traits=[
        Trait.new(id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 10}))
    ],
    members={
        "member": {
            "target": STRING,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"),
                    value=MappingProxyType({"min": 1, "max": 256}),
                )
            ],
        }
    },
)

INVOCATION_ARN = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#InvocationArn"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 2048}),
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:async-invoke/[a-z0-9]{12}$",
        ),
    ],
)

GET_ASYNC_INVOKE_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GetAsyncInvokeInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#GetAsyncInvokeRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "invocationArn": {
            "target": INVOCATION_ARN,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        }
    },
)

ASYNC_INVOKE_IDEMPOTENCY_TOKEN = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeIdempotencyToken"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 256}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[!-~]*$"),
    ],
)

TIMESTAMP = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#Timestamp"),
    shape_type=ShapeType.TIMESTAMP,
    traits=[Trait.new(id=ShapeID("smithy.api#timestampFormat"), value="date-time")],
)

ASYNC_INVOKE_MESSAGE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeMessage"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2048})
        ),
        Trait.new(id=ShapeID("smithy.api#sensitive")),
    ],
)

ASYNC_INVOKE_ARN = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeArn"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 2048}),
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^arn:[a-z0-9\\-]+:bedrock:[a-z0-9\\-]*:[0-9]*:(provisioned-model|foundation-model)/.+$",
        ),
    ],
)

KMS_KEY_ID = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#KmsKeyId"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 2048}),
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:((key/[a-zA-Z0-9-]{36})|(alias/[a-zA-Z0-9-_/]+))$",
        ),
    ],
)

S3_URI = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#S3Uri"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 1024}),
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$",
        ),
    ],
)

ASYNC_INVOKE_S3_OUTPUT_DATA_CONFIG = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeS3OutputDataConfig"),
    members={
        "s3Uri": {
            "target": S3_URI,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "kmsKeyId": {"target": KMS_KEY_ID},
        "bucketOwner": {"target": ACCOUNT_ID},
    },
)

ASYNC_INVOKE_OUTPUT_DATA_CONFIG = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeOutputDataConfig"),
    shape_type=ShapeType.UNION,
    members={"s3OutputDataConfig": {"target": ASYNC_INVOKE_S3_OUTPUT_DATA_CONFIG}},
)

ASYNC_INVOKE_STATUS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeStatus"),
    shape_type=ShapeType.ENUM,
    members={
        "IN_PROGRESS": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="InProgress")
            ],
        },
        "COMPLETED": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="Completed")
            ],
        },
        "FAILED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="Failed")],
        },
    },
)

GET_ASYNC_INVOKE_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GetAsyncInvokeOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#GetAsyncInvokeResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "invocationArn": {
            "target": INVOCATION_ARN,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "modelArn": {
            "target": ASYNC_INVOKE_ARN,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "clientRequestToken": {"target": ASYNC_INVOKE_IDEMPOTENCY_TOKEN},
        "status": {
            "target": ASYNC_INVOKE_STATUS,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "failureMessage": {"target": ASYNC_INVOKE_MESSAGE},
        "submitTime": {
            "target": TIMESTAMP,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "lastModifiedTime": {"target": TIMESTAMP},
        "endTime": {"target": TIMESTAMP},
        "outputDataConfig": {
            "target": ASYNC_INVOKE_OUTPUT_DATA_CONFIG,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

INTERNAL_SERVER_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InternalServerException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="server"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=500),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

THROTTLING_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ThrottlingException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=429),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

VALIDATION_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ValidationException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=400),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

GET_ASYNC_INVOKE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GetAsyncInvoke"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {"code": 200, "method": "GET", "uri": "/async-invoke/{invocationArn}"}
            ),
        ),
        Trait.new(id=ShapeID("smithy.api#readonly")),
    ],
)

MAX_RESULTS = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#MaxResults"),
    shape_type=ShapeType.INTEGER,
    traits=[
        Trait.new(id=ShapeID("smithy.api#box")),
        Trait.new(
            id=ShapeID("smithy.api#range"),
            value=MappingProxyType({"min": 1, "max": 1000}),
        ),
    ],
)

PAGINATION_TOKEN = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#PaginationToken"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 2048}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^\\S*$"),
    ],
)

SORT_ASYNC_INVOCATION_BY = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SortAsyncInvocationBy"),
    shape_type=ShapeType.ENUM,
    members={
        "SUBMISSION_TIME": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="SubmissionTime")
            ],
        }
    },
)

SORT_ORDER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SortOrder"),
    shape_type=ShapeType.ENUM,
    members={
        "ASCENDING": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="Ascending")
            ],
        },
        "DESCENDING": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="Descending")
            ],
        },
    },
)

LIST_ASYNC_INVOKES_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ListAsyncInvokesInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ListAsyncInvokesRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "submitTimeAfter": {
            "target": TIMESTAMP,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="submitTimeAfter")
            ],
        },
        "submitTimeBefore": {
            "target": TIMESTAMP,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="submitTimeBefore")
            ],
        },
        "statusEquals": {
            "target": ASYNC_INVOKE_STATUS,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="statusEquals")
            ],
        },
        "maxResults": {
            "target": MAX_RESULTS,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="maxResults")
            ],
        },
        "nextToken": {
            "target": PAGINATION_TOKEN,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="nextToken")
            ],
        },
        "sortBy": {
            "target": SORT_ASYNC_INVOCATION_BY,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value="SubmissionTime"),
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="sortBy"),
            ],
        },
        "sortOrder": {
            "target": SORT_ORDER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value="Descending"),
                Trait.new(id=ShapeID("smithy.api#httpQuery"), value="sortOrder"),
            ],
        },
    },
)

ASYNC_INVOKE_SUMMARY = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeSummary"),
    members={
        "invocationArn": {
            "target": INVOCATION_ARN,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "modelArn": {
            "target": ASYNC_INVOKE_ARN,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "clientRequestToken": {"target": ASYNC_INVOKE_IDEMPOTENCY_TOKEN},
        "status": {"target": ASYNC_INVOKE_STATUS},
        "failureMessage": {"target": ASYNC_INVOKE_MESSAGE},
        "submitTime": {
            "target": TIMESTAMP,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "lastModifiedTime": {"target": TIMESTAMP},
        "endTime": {"target": TIMESTAMP},
        "outputDataConfig": {
            "target": ASYNC_INVOKE_OUTPUT_DATA_CONFIG,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

ASYNC_INVOKE_SUMMARIES = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeSummaries"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": ASYNC_INVOKE_SUMMARY}},
)

LIST_ASYNC_INVOKES_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ListAsyncInvokesOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ListAsyncInvokesResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "nextToken": {"target": PAGINATION_TOKEN},
        "asyncInvokeSummaries": {"target": ASYNC_INVOKE_SUMMARIES},
    },
)

LIST_ASYNC_INVOKES = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ListAsyncInvokes"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#paginated"),
            value=MappingProxyType(
                {
                    "inputToken": "nextToken",
                    "outputToken": "nextToken",
                    "pageSize": "maxResults",
                    "items": "asyncInvokeSummaries",
                }
            ),
        ),
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {"code": 200, "method": "GET", "uri": "/async-invoke"}
            ),
        ),
        Trait.new(id=ShapeID("smithy.api#readonly")),
    ],
)

CONFLICT_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConflictException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=400),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

RESOURCE_NOT_FOUND_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ResourceNotFoundException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=404),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

SERVICE_QUOTA_EXCEEDED_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ServiceQuotaExceededException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=400),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

SERVICE_UNAVAILABLE_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ServiceUnavailableException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="server"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=503),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

ASYNC_INVOKE_IDENTIFIER = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AsyncInvokeIdentifier"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 256}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z_\\.\\-/0-9:]+$"),
    ],
)

MODEL_INPUT_PAYLOAD = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ModelInputPayload"),
    shape_type=ShapeType.DOCUMENT,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
)

TAG_KEY = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#TagKey"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 128}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z0-9\\s._:/=+@-]*$"),
    ],
)

TAG_VALUE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#TagValue"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 0, "max": 256}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z0-9\\s._:/=+@-]*$"),
    ],
)

TAG = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Tag"),
    members={
        "key": {
            "target": TAG_KEY,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "value": {
            "target": TAG_VALUE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

TAG_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#TagList"),
    shape_type=ShapeType.LIST,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 0, "max": 200}),
        )
    ],
    members={"member": {"target": TAG}},
)

START_ASYNC_INVOKE_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#StartAsyncInvokeInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#StartAsyncInvokeRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "clientRequestToken": {
            "target": ASYNC_INVOKE_IDEMPOTENCY_TOKEN,
            "traits": [Trait.new(id=ShapeID("smithy.api#idempotencyToken"))],
        },
        "modelId": {
            "target": ASYNC_INVOKE_IDENTIFIER,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "modelInput": {
            "target": MODEL_INPUT_PAYLOAD,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "outputDataConfig": {
            "target": ASYNC_INVOKE_OUTPUT_DATA_CONFIG,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "tags": {"target": TAG_LIST},
    },
)

START_ASYNC_INVOKE_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#StartAsyncInvokeOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#StartAsyncInvokeResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "invocationArn": {
            "target": INVOCATION_ARN,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

START_ASYNC_INVOKE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#StartAsyncInvoke"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(id=ShapeID("smithy.api#idempotent")),
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {"code": 200, "method": "POST", "uri": "/async-invoke"}
            ),
        ),
    ],
)

GUARDRAIL_IMAGE_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailImageFormat"),
    shape_type=ShapeType.ENUM,
    members={
        "PNG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="png")],
        },
        "JPEG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="jpeg")],
        },
    },
)

GUARDRAIL_IMAGE_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailImageSource"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "bytes": {
            "target": BLOB,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                )
            ],
        }
    },
)

GUARDRAIL_IMAGE_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailImageBlock"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "format": {
            "target": GUARDRAIL_IMAGE_FORMAT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "source": {
            "target": GUARDRAIL_IMAGE_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

GUARDRAIL_CONTENT_QUALIFIER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentQualifier"),
    shape_type=ShapeType.ENUM,
    members={
        "GROUNDING_SOURCE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="grounding_source")
            ],
        },
        "QUERY": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="query")],
        },
        "GUARD_CONTENT": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="guard_content")
            ],
        },
    },
)

GUARDRAIL_CONTENT_QUALIFIER_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentQualifierList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_CONTENT_QUALIFIER}},
)

GUARDRAIL_TEXT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTextBlock"),
    members={
        "text": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "qualifiers": {"target": GUARDRAIL_CONTENT_QUALIFIER_LIST},
    },
)

GUARDRAIL_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentBlock"),
    shape_type=ShapeType.UNION,
    members={
        "text": {"target": GUARDRAIL_TEXT_BLOCK},
        "image": {"target": GUARDRAIL_IMAGE_BLOCK},
    },
)

GUARDRAIL_CONTENT_BLOCK_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentBlockList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_CONTENT_BLOCK}},
)

GUARDRAIL_IDENTIFIER = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailIdentifier"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2048})
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^(|([a-z0-9]+)|(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:guardrail/[a-z0-9]+))$",
        ),
    ],
)

GUARDRAIL_VERSION = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailVersion"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#pattern"), value="^(|([1-9][0-9]{0,7})|(DRAFT))$"
        )
    ],
)

GUARDRAIL_OUTPUT_SCOPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOutputScope"),
    shape_type=ShapeType.ENUM,
    members={
        "INTERVENTIONS": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="INTERVENTIONS")
            ],
        },
        "FULL": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="FULL")],
        },
    },
)

GUARDRAIL_CONTENT_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentSource"),
    shape_type=ShapeType.ENUM,
    members={
        "INPUT": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="INPUT")],
        },
        "OUTPUT": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="OUTPUT")],
        },
    },
)

APPLY_GUARDRAIL_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ApplyGuardrailInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ApplyGuardrailRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "guardrailIdentifier": {
            "target": GUARDRAIL_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "guardrailVersion": {
            "target": GUARDRAIL_VERSION,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "source": {
            "target": GUARDRAIL_CONTENT_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "content": {
            "target": GUARDRAIL_CONTENT_BLOCK_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "outputScope": {"target": GUARDRAIL_OUTPUT_SCOPE},
    },
)

GUARDRAIL_ACTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAction"),
    shape_type=ShapeType.ENUM,
    members={
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
        "GUARDRAIL_INTERVENED": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="GUARDRAIL_INTERVENED"
                )
            ],
        },
    },
)

GUARDRAIL_ARN = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailArn"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2048})
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:guardrail/[a-z0-9]+)$",
        ),
    ],
)

GUARDRAIL_ID = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailId"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2048})
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^([a-z0-9]+)$"),
    ],
)

GUARDRAIL_ORIGIN = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOrigin"),
    shape_type=ShapeType.ENUM,
    members={
        "REQUEST": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="REQUEST")],
        },
        "ACCOUNT_ENFORCED": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="ACCOUNT_ENFORCED")
            ],
        },
        "ORGANIZATION_ENFORCED": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="ORGANIZATION_ENFORCED"
                )
            ],
        },
    },
)

GUARDRAIL_ORIGIN_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOriginList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_ORIGIN}},
)

GUARDRAIL_OWNERSHIP = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOwnership"),
    shape_type=ShapeType.ENUM,
    members={
        "SELF": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="SELF")],
        },
        "CROSS_ACCOUNT": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="CROSS_ACCOUNT")
            ],
        },
    },
)

APPLIED_GUARDRAIL_DETAILS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AppliedGuardrailDetails"),
    members={
        "guardrailId": {"target": GUARDRAIL_ID},
        "guardrailVersion": {"target": GUARDRAIL_VERSION},
        "guardrailArn": {"target": GUARDRAIL_ARN},
        "guardrailOrigin": {"target": GUARDRAIL_ORIGIN_LIST},
        "guardrailOwnership": {"target": GUARDRAIL_OWNERSHIP},
    },
)

AUTOMATED_REASONING_RULE_IDENTIFIER = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AutomatedReasoningRuleIdentifier"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 12})),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-z0-9]{12}$"),
    ],
)

GUARDRAIL_AUTOMATED_REASONING_POLICY_VERSION_ARN = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningPolicyVersionArn"
    ),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2048})
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:automated-reasoning-policy/[a-z0-9]{12}(:([1-9][0-9]{0,11}))?$",
        ),
    ],
)

GUARDRAIL_AUTOMATED_REASONING_RULE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningRule"),
    members={
        "identifier": {"target": AUTOMATED_REASONING_RULE_IDENTIFIER},
        "policyVersionArn": {
            "target": GUARDRAIL_AUTOMATED_REASONING_POLICY_VERSION_ARN
        },
    },
)

GUARDRAIL_AUTOMATED_REASONING_RULE_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningRuleList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_RULE}},
)

GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LOGIC_CONTENT = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningStatementLogicContent"
    ),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 1000})
        ),
        Trait.new(id=ShapeID("smithy.api#sensitive")),
    ],
)

GUARDRAIL_AUTOMATED_REASONING_STATEMENT_NATURAL_LANGUAGE_CONTENT = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningStatementNaturalLanguageContent"
    ),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 1000})
        ),
        Trait.new(id=ShapeID("smithy.api#sensitive")),
    ],
)

GUARDRAIL_AUTOMATED_REASONING_STATEMENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningStatement"),
    members={
        "logic": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LOGIC_CONTENT},
        "naturalLanguage": {
            "target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_NATURAL_LANGUAGE_CONTENT
        },
    },
)

GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningStatementList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT}},
)

GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING_TYPE = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningLogicWarningType"
    ),
    shape_type=ShapeType.ENUM,
    members={
        "ALWAYS_FALSE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="ALWAYS_FALSE")
            ],
        },
        "ALWAYS_TRUE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="ALWAYS_TRUE")
            ],
        },
    },
)

GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningLogicWarning"),
    members={
        "type": {"target": GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING_TYPE},
        "premises": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LIST},
        "claims": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LIST},
    },
)

GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_CONFIDENCE = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTranslationConfidence"
    ),
    shape_type=ShapeType.DOUBLE,
    traits=[
        Trait.new(id=ShapeID("smithy.api#box")),
        Trait.new(
            id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0, "max": 1})
        ),
    ],
)

GUARDRAIL_AUTOMATED_REASONING_INPUT_TEXT_REFERENCE = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningInputTextReference"
    ),
    members={
        "text": {
            "target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_NATURAL_LANGUAGE_CONTENT
        }
    },
)

GUARDRAIL_AUTOMATED_REASONING_INPUT_TEXT_REFERENCE_LIST = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningInputTextReferenceList"
    ),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_INPUT_TEXT_REFERENCE}},
)

GUARDRAIL_AUTOMATED_REASONING_TRANSLATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTranslation"),
    members={
        "premises": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LIST},
        "claims": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LIST},
        "untranslatedPremises": {
            "target": GUARDRAIL_AUTOMATED_REASONING_INPUT_TEXT_REFERENCE_LIST
        },
        "untranslatedClaims": {
            "target": GUARDRAIL_AUTOMATED_REASONING_INPUT_TEXT_REFERENCE_LIST
        },
        "confidence": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_CONFIDENCE},
    },
)

GUARDRAIL_AUTOMATED_REASONING_IMPOSSIBLE_FINDING = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningImpossibleFinding"
    ),
    members={
        "translation": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION},
        "contradictingRules": {"target": GUARDRAIL_AUTOMATED_REASONING_RULE_LIST},
        "logicWarning": {"target": GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING},
    },
)

GUARDRAIL_AUTOMATED_REASONING_INVALID_FINDING = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningInvalidFinding"
    ),
    members={
        "translation": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION},
        "contradictingRules": {"target": GUARDRAIL_AUTOMATED_REASONING_RULE_LIST},
        "logicWarning": {"target": GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING},
    },
)

GUARDRAIL_AUTOMATED_REASONING_NO_TRANSLATIONS_FINDING = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningNoTranslationsFinding"
    )
)

GUARDRAIL_AUTOMATED_REASONING_SCENARIO = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningScenario"),
    members={"statements": {"target": GUARDRAIL_AUTOMATED_REASONING_STATEMENT_LIST}},
)

GUARDRAIL_AUTOMATED_REASONING_SATISFIABLE_FINDING = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningSatisfiableFinding"
    ),
    members={
        "translation": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION},
        "claimsTrueScenario": {"target": GUARDRAIL_AUTOMATED_REASONING_SCENARIO},
        "claimsFalseScenario": {"target": GUARDRAIL_AUTOMATED_REASONING_SCENARIO},
        "logicWarning": {"target": GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING},
    },
)

GUARDRAIL_AUTOMATED_REASONING_TOO_COMPLEX_FINDING = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTooComplexFinding"
    )
)

GUARDRAIL_AUTOMATED_REASONING_DIFFERENCE_SCENARIO_LIST = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningDifferenceScenarioList"
    ),
    shape_type=ShapeType.LIST,
    traits=[
        Trait.new(id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2}))
    ],
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_SCENARIO}},
)

GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_LIST = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTranslationList"
    ),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION}},
)

GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_OPTION = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTranslationOption"
    ),
    members={
        "translations": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_LIST}
    },
)

GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_OPTION_LIST = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTranslationOptionList"
    ),
    shape_type=ShapeType.LIST,
    traits=[
        Trait.new(id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 2}))
    ],
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_OPTION}},
)

GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_AMBIGUOUS_FINDING = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningTranslationAmbiguousFinding"
    ),
    members={
        "options": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_OPTION_LIST},
        "differenceScenarios": {
            "target": GUARDRAIL_AUTOMATED_REASONING_DIFFERENCE_SCENARIO_LIST
        },
    },
)

GUARDRAIL_AUTOMATED_REASONING_VALID_FINDING = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningValidFinding"),
    members={
        "translation": {"target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION},
        "claimsTrueScenario": {"target": GUARDRAIL_AUTOMATED_REASONING_SCENARIO},
        "supportingRules": {"target": GUARDRAIL_AUTOMATED_REASONING_RULE_LIST},
        "logicWarning": {"target": GUARDRAIL_AUTOMATED_REASONING_LOGIC_WARNING},
    },
)

GUARDRAIL_AUTOMATED_REASONING_FINDING = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningFinding"),
    shape_type=ShapeType.UNION,
    members={
        "valid": {"target": GUARDRAIL_AUTOMATED_REASONING_VALID_FINDING},
        "invalid": {"target": GUARDRAIL_AUTOMATED_REASONING_INVALID_FINDING},
        "satisfiable": {"target": GUARDRAIL_AUTOMATED_REASONING_SATISFIABLE_FINDING},
        "impossible": {"target": GUARDRAIL_AUTOMATED_REASONING_IMPOSSIBLE_FINDING},
        "translationAmbiguous": {
            "target": GUARDRAIL_AUTOMATED_REASONING_TRANSLATION_AMBIGUOUS_FINDING
        },
        "tooComplex": {"target": GUARDRAIL_AUTOMATED_REASONING_TOO_COMPLEX_FINDING},
        "noTranslations": {
            "target": GUARDRAIL_AUTOMATED_REASONING_NO_TRANSLATIONS_FINDING
        },
    },
)

GUARDRAIL_AUTOMATED_REASONING_FINDING_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningFindingList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_AUTOMATED_REASONING_FINDING}},
)

GUARDRAIL_AUTOMATED_REASONING_POLICY_ASSESSMENT = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningPolicyAssessment"
    ),
    members={"findings": {"target": GUARDRAIL_AUTOMATED_REASONING_FINDING_LIST}},
)

GUARDRAIL_CONTENT_POLICY_ACTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentPolicyAction"),
    shape_type=ShapeType.ENUM,
    members={
        "BLOCKED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="BLOCKED")],
        },
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
    },
)

GUARDRAIL_CONTENT_FILTER_CONFIDENCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentFilterConfidence"),
    shape_type=ShapeType.ENUM,
    members={
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
        "LOW": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="LOW")],
        },
        "MEDIUM": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="MEDIUM")],
        },
        "HIGH": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="HIGH")],
        },
    },
)

GUARDRAIL_CONTENT_FILTER_STRENGTH = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentFilterStrength"),
    shape_type=ShapeType.ENUM,
    members={
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
        "LOW": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="LOW")],
        },
        "MEDIUM": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="MEDIUM")],
        },
        "HIGH": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="HIGH")],
        },
    },
)

GUARDRAIL_CONTENT_FILTER_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentFilterType"),
    shape_type=ShapeType.ENUM,
    members={
        "INSULTS": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="INSULTS")],
        },
        "HATE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="HATE")],
        },
        "SEXUAL": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="SEXUAL")],
        },
        "VIOLENCE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="VIOLENCE")],
        },
        "MISCONDUCT": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="MISCONDUCT")
            ],
        },
        "PROMPT_ATTACK": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="PROMPT_ATTACK")
            ],
        },
    },
)

GUARDRAIL_CONTENT_FILTER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentFilter"),
    members={
        "type": {
            "target": GUARDRAIL_CONTENT_FILTER_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "confidence": {
            "target": GUARDRAIL_CONTENT_FILTER_CONFIDENCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "filterStrength": {"target": GUARDRAIL_CONTENT_FILTER_STRENGTH},
        "action": {
            "target": GUARDRAIL_CONTENT_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_CONTENT_FILTER_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentFilterList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_CONTENT_FILTER}},
)

GUARDRAIL_CONTENT_POLICY_ASSESSMENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentPolicyAssessment"),
    members={
        "filters": {
            "target": GUARDRAIL_CONTENT_FILTER_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

GUARDRAIL_CONTEXTUAL_GROUNDING_POLICY_ACTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContextualGroundingPolicyAction"),
    shape_type=ShapeType.ENUM,
    members={
        "BLOCKED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="BLOCKED")],
        },
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
    },
)

GUARDRAIL_CONTEXTUAL_GROUNDING_FILTER_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContextualGroundingFilterType"),
    shape_type=ShapeType.ENUM,
    members={
        "GROUNDING": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="GROUNDING")
            ],
        },
        "RELEVANCE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="RELEVANCE")
            ],
        },
    },
)

GUARDRAIL_CONTEXTUAL_GROUNDING_FILTER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContextualGroundingFilter"),
    members={
        "type": {
            "target": GUARDRAIL_CONTEXTUAL_GROUNDING_FILTER_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "threshold": {
            "target": DOUBLE,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#range"),
                    value=MappingProxyType({"min": 0, "max": 1}),
                ),
            ],
        },
        "score": {
            "target": DOUBLE,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#range"),
                    value=MappingProxyType({"min": 0, "max": 1}),
                ),
            ],
        },
        "action": {
            "target": GUARDRAIL_CONTEXTUAL_GROUNDING_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_CONTEXTUAL_GROUNDING_FILTERS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContextualGroundingFilters"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_CONTEXTUAL_GROUNDING_FILTER}},
)

GUARDRAIL_CONTEXTUAL_GROUNDING_POLICY_ASSESSMENT = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailContextualGroundingPolicyAssessment"
    ),
    members={"filters": {"target": GUARDRAIL_CONTEXTUAL_GROUNDING_FILTERS}},
)

IMAGES_GUARDED = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ImagesGuarded"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

IMAGES_TOTAL = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ImagesTotal"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_IMAGE_COVERAGE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailImageCoverage"),
    members={"guarded": {"target": IMAGES_GUARDED}, "total": {"target": IMAGES_TOTAL}},
)

TEXT_CHARACTERS_GUARDED = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#TextCharactersGuarded"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

TEXT_CHARACTERS_TOTAL = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#TextCharactersTotal"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_TEXT_CHARACTERS_COVERAGE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTextCharactersCoverage"),
    members={
        "guarded": {"target": TEXT_CHARACTERS_GUARDED},
        "total": {"target": TEXT_CHARACTERS_TOTAL},
    },
)

GUARDRAIL_COVERAGE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailCoverage"),
    members={
        "textCharacters": {"target": GUARDRAIL_TEXT_CHARACTERS_COVERAGE},
        "images": {"target": GUARDRAIL_IMAGE_COVERAGE},
    },
)

GUARDRAIL_PROCESSING_LATENCY = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailProcessingLatency"),
    shape_type=ShapeType.LONG,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_AUTOMATED_REASONING_POLICIES_PROCESSED = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningPoliciesProcessed"
    ),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_AUTOMATED_REASONING_POLICY_UNITS_PROCESSED = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailAutomatedReasoningPolicyUnitsProcessed"
    ),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_CONTENT_POLICY_IMAGE_UNITS_PROCESSED = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailContentPolicyImageUnitsProcessed"
    ),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_CONTENT_POLICY_UNITS_PROCESSED = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailContentPolicyUnitsProcessed"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_CONTEXTUAL_GROUNDING_POLICY_UNITS_PROCESSED = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailContextualGroundingPolicyUnitsProcessed"
    ),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_SENSITIVE_INFORMATION_POLICY_FREE_UNITS_PROCESSED = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailSensitiveInformationPolicyFreeUnitsProcessed"
    ),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_SENSITIVE_INFORMATION_POLICY_UNITS_PROCESSED = Schema(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailSensitiveInformationPolicyUnitsProcessed"
    ),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_TOPIC_POLICY_UNITS_PROCESSED = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTopicPolicyUnitsProcessed"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_WORD_POLICY_UNITS_PROCESSED = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailWordPolicyUnitsProcessed"),
    shape_type=ShapeType.INTEGER,
    traits=[Trait.new(id=ShapeID("smithy.api#box"))],
)

GUARDRAIL_USAGE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailUsage"),
    members={
        "topicPolicyUnits": {
            "target": GUARDRAIL_TOPIC_POLICY_UNITS_PROCESSED,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "contentPolicyUnits": {
            "target": GUARDRAIL_CONTENT_POLICY_UNITS_PROCESSED,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "wordPolicyUnits": {
            "target": GUARDRAIL_WORD_POLICY_UNITS_PROCESSED,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "sensitiveInformationPolicyUnits": {
            "target": GUARDRAIL_SENSITIVE_INFORMATION_POLICY_UNITS_PROCESSED,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "sensitiveInformationPolicyFreeUnits": {
            "target": GUARDRAIL_SENSITIVE_INFORMATION_POLICY_FREE_UNITS_PROCESSED,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "contextualGroundingPolicyUnits": {
            "target": GUARDRAIL_CONTEXTUAL_GROUNDING_POLICY_UNITS_PROCESSED,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "contentPolicyImageUnits": {
            "target": GUARDRAIL_CONTENT_POLICY_IMAGE_UNITS_PROCESSED
        },
        "automatedReasoningPolicyUnits": {
            "target": GUARDRAIL_AUTOMATED_REASONING_POLICY_UNITS_PROCESSED
        },
        "automatedReasoningPolicies": {
            "target": GUARDRAIL_AUTOMATED_REASONING_POLICIES_PROCESSED
        },
    },
)

GUARDRAIL_INVOCATION_METRICS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailInvocationMetrics"),
    members={
        "guardrailProcessingLatency": {"target": GUARDRAIL_PROCESSING_LATENCY},
        "usage": {"target": GUARDRAIL_USAGE},
        "guardrailCoverage": {"target": GUARDRAIL_COVERAGE},
    },
)

GUARDRAIL_SENSITIVE_INFORMATION_POLICY_ACTION = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailSensitiveInformationPolicyAction"
    ),
    shape_type=ShapeType.ENUM,
    members={
        "ANONYMIZED": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="ANONYMIZED")
            ],
        },
        "BLOCKED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="BLOCKED")],
        },
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
    },
)

GUARDRAIL_PII_ENTITY_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailPiiEntityType"),
    shape_type=ShapeType.ENUM,
    members={
        "ADDRESS": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ADDRESS")],
        },
        "AGE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="AGE")],
        },
        "AWS_ACCESS_KEY": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="AWS_ACCESS_KEY")
            ],
        },
        "AWS_SECRET_KEY": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="AWS_SECRET_KEY")
            ],
        },
        "CA_HEALTH_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="CA_HEALTH_NUMBER")
            ],
        },
        "CA_SOCIAL_INSURANCE_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="CA_SOCIAL_INSURANCE_NUMBER",
                )
            ],
        },
        "CREDIT_DEBIT_CARD_CVV": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="CREDIT_DEBIT_CARD_CVV"
                )
            ],
        },
        "CREDIT_DEBIT_CARD_EXPIRY": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="CREDIT_DEBIT_CARD_EXPIRY"
                )
            ],
        },
        "CREDIT_DEBIT_CARD_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="CREDIT_DEBIT_CARD_NUMBER"
                )
            ],
        },
        "DRIVER_ID": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="DRIVER_ID")
            ],
        },
        "EMAIL": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="EMAIL")],
        },
        "INTERNATIONAL_BANK_ACCOUNT_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="INTERNATIONAL_BANK_ACCOUNT_NUMBER",
                )
            ],
        },
        "IP_ADDRESS": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="IP_ADDRESS")
            ],
        },
        "LICENSE_PLATE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="LICENSE_PLATE")
            ],
        },
        "MAC_ADDRESS": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="MAC_ADDRESS")
            ],
        },
        "NAME": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NAME")],
        },
        "PASSWORD": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PASSWORD")],
        },
        "PHONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PHONE")],
        },
        "PIN": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="PIN")],
        },
        "SWIFT_CODE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="SWIFT_CODE")
            ],
        },
        "UK_NATIONAL_HEALTH_SERVICE_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="UK_NATIONAL_HEALTH_SERVICE_NUMBER",
                )
            ],
        },
        "UK_NATIONAL_INSURANCE_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="UK_NATIONAL_INSURANCE_NUMBER",
                )
            ],
        },
        "UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER",
                )
            ],
        },
        "URL": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="URL")],
        },
        "USERNAME": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="USERNAME")],
        },
        "US_BANK_ACCOUNT_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="US_BANK_ACCOUNT_NUMBER"
                )
            ],
        },
        "US_BANK_ROUTING_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="US_BANK_ROUTING_NUMBER"
                )
            ],
        },
        "US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER",
                )
            ],
        },
        "US_PASSPORT_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="US_PASSPORT_NUMBER"
                )
            ],
        },
        "US_SOCIAL_SECURITY_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="US_SOCIAL_SECURITY_NUMBER",
                )
            ],
        },
        "VEHICLE_IDENTIFICATION_NUMBER": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="VEHICLE_IDENTIFICATION_NUMBER",
                )
            ],
        },
    },
)

GUARDRAIL_PII_ENTITY_FILTER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailPiiEntityFilter"),
    members={
        "match": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "type": {
            "target": GUARDRAIL_PII_ENTITY_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "action": {
            "target": GUARDRAIL_SENSITIVE_INFORMATION_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_PII_ENTITY_FILTER_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailPiiEntityFilterList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_PII_ENTITY_FILTER}},
)

GUARDRAIL_REGEX_FILTER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailRegexFilter"),
    members={
        "name": {"target": STRING},
        "match": {"target": STRING},
        "regex": {"target": STRING},
        "action": {
            "target": GUARDRAIL_SENSITIVE_INFORMATION_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_REGEX_FILTER_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailRegexFilterList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_REGEX_FILTER}},
)

GUARDRAIL_SENSITIVE_INFORMATION_POLICY_ASSESSMENT = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#GuardrailSensitiveInformationPolicyAssessment"
    ),
    members={
        "piiEntities": {
            "target": GUARDRAIL_PII_ENTITY_FILTER_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "regexes": {
            "target": GUARDRAIL_REGEX_FILTER_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

GUARDRAIL_TOPIC_POLICY_ACTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTopicPolicyAction"),
    shape_type=ShapeType.ENUM,
    members={
        "BLOCKED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="BLOCKED")],
        },
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
    },
)

GUARDRAIL_TOPIC_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTopicType"),
    shape_type=ShapeType.ENUM,
    members={
        "DENY": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="DENY")],
        }
    },
)

GUARDRAIL_TOPIC = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTopic"),
    members={
        "name": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "type": {
            "target": GUARDRAIL_TOPIC_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "action": {
            "target": GUARDRAIL_TOPIC_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_TOPIC_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTopicList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_TOPIC}},
)

GUARDRAIL_TOPIC_POLICY_ASSESSMENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTopicPolicyAssessment"),
    members={
        "topics": {
            "target": GUARDRAIL_TOPIC_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

GUARDRAIL_WORD_POLICY_ACTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailWordPolicyAction"),
    shape_type=ShapeType.ENUM,
    members={
        "BLOCKED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="BLOCKED")],
        },
        "NONE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="NONE")],
        },
    },
)

GUARDRAIL_CUSTOM_WORD = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailCustomWord"),
    members={
        "match": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "action": {
            "target": GUARDRAIL_WORD_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_CUSTOM_WORD_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailCustomWordList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_CUSTOM_WORD}},
)

GUARDRAIL_MANAGED_WORD_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailManagedWordType"),
    shape_type=ShapeType.ENUM,
    members={
        "PROFANITY": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="PROFANITY")
            ],
        }
    },
)

GUARDRAIL_MANAGED_WORD = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailManagedWord"),
    members={
        "match": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "type": {
            "target": GUARDRAIL_MANAGED_WORD_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "action": {
            "target": GUARDRAIL_WORD_POLICY_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "detected": {"target": BOOLEAN},
    },
)

GUARDRAIL_MANAGED_WORD_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailManagedWordList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_MANAGED_WORD}},
)

GUARDRAIL_WORD_POLICY_ASSESSMENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailWordPolicyAssessment"),
    members={
        "customWords": {
            "target": GUARDRAIL_CUSTOM_WORD_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "managedWordLists": {
            "target": GUARDRAIL_MANAGED_WORD_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

GUARDRAIL_ASSESSMENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAssessment"),
    members={
        "topicPolicy": {"target": GUARDRAIL_TOPIC_POLICY_ASSESSMENT},
        "contentPolicy": {"target": GUARDRAIL_CONTENT_POLICY_ASSESSMENT},
        "wordPolicy": {"target": GUARDRAIL_WORD_POLICY_ASSESSMENT},
        "sensitiveInformationPolicy": {
            "target": GUARDRAIL_SENSITIVE_INFORMATION_POLICY_ASSESSMENT
        },
        "contextualGroundingPolicy": {
            "target": GUARDRAIL_CONTEXTUAL_GROUNDING_POLICY_ASSESSMENT
        },
        "automatedReasoningPolicy": {
            "target": GUARDRAIL_AUTOMATED_REASONING_POLICY_ASSESSMENT
        },
        "invocationMetrics": {"target": GUARDRAIL_INVOCATION_METRICS},
        "appliedGuardrailDetails": {"target": APPLIED_GUARDRAIL_DETAILS},
    },
)

GUARDRAIL_ASSESSMENT_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAssessmentList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_ASSESSMENT}},
)

GUARDRAIL_OUTPUT_TEXT = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOutputText"),
    shape_type=ShapeType.STRING,
)

GUARDRAIL_OUTPUT_CONTENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOutputContent"),
    members={"text": {"target": GUARDRAIL_OUTPUT_TEXT}},
)

GUARDRAIL_OUTPUT_CONTENT_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailOutputContentList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_OUTPUT_CONTENT}},
)

APPLY_GUARDRAIL_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ApplyGuardrailOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ApplyGuardrailResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "usage": {
            "target": GUARDRAIL_USAGE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "action": {
            "target": GUARDRAIL_ACTION,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "actionReason": {"target": STRING},
        "outputs": {
            "target": GUARDRAIL_OUTPUT_CONTENT_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "assessments": {
            "target": GUARDRAIL_ASSESSMENT_LIST,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "guardrailCoverage": {"target": GUARDRAIL_COVERAGE},
    },
)

APPLY_GUARDRAIL = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ApplyGuardrail"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {
                    "code": 200,
                    "method": "POST",
                    "uri": "/guardrail/{guardrailIdentifier}/version/{guardrailVersion}/apply",
                }
            ),
        )
    ],
)

GUARDRAIL_TRACE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTrace"),
    shape_type=ShapeType.ENUM,
    members={
        "ENABLED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="enabled")],
        },
        "DISABLED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="disabled")],
        },
        "ENABLED_FULL": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="enabled_full")
            ],
        },
    },
)

GUARDRAIL_CONFIGURATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConfiguration"),
    members={
        "guardrailIdentifier": {
            "target": GUARDRAIL_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value=""),
                Trait.new(id=ShapeID("smithy.api#addedDefault")),
            ],
        },
        "guardrailVersion": {
            "target": GUARDRAIL_VERSION,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value=""),
                Trait.new(id=ShapeID("smithy.api#addedDefault")),
            ],
        },
        "trace": {
            "target": GUARDRAIL_TRACE,
            "traits": [Trait.new(id=ShapeID("smithy.api#default"), value="disabled")],
        },
    },
)

NON_EMPTY_STRING = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#NonEmptyString"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1}))
    ],
)

NON_EMPTY_STRING_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#NonEmptyStringList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": NON_EMPTY_STRING}},
)

INFERENCE_CONFIGURATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InferenceConfiguration"),
    members={
        "maxTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 1})
                )
            ],
        },
        "temperature": {
            "target": FLOAT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"),
                    value=MappingProxyType({"min": 0, "max": 1}),
                )
            ],
        },
        "topP": {
            "target": FLOAT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"),
                    value=MappingProxyType({"min": 0, "max": 1}),
                )
            ],
        },
        "stopSequences": {
            "target": NON_EMPTY_STRING_LIST,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"),
                    value=MappingProxyType({"max": 2500}),
                )
            ],
        },
    },
)

ERROR_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ErrorBlock"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={"message": {"target": STRING}},
)

AUDIO_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AudioFormat"),
    shape_type=ShapeType.ENUM,
    members={
        "MP3": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mp3")],
        },
        "OPUS": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="opus")],
        },
        "WAV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="wav")],
        },
        "AAC": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="aac")],
        },
        "FLAC": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="flac")],
        },
        "MP4": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mp4")],
        },
        "OGG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ogg")],
        },
        "MKV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mkv")],
        },
        "MKA": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mka")],
        },
        "X_AAC": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="x-aac")],
        },
        "M4A": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="m4a")],
        },
        "MPEG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mpeg")],
        },
        "MPGA": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mpga")],
        },
        "PCM": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pcm")],
        },
        "WEBM": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="webm")],
        },
    },
)

S3_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#S3Location"),
    members={
        "uri": {
            "target": S3_URI,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "bucketOwner": {"target": ACCOUNT_ID},
    },
)

AUDIO_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AudioSource"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "bytes": {
            "target": BLOB,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                )
            ],
        },
        "s3Location": {"target": S3_LOCATION},
    },
)

AUDIO_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AudioBlock"),
    members={
        "format": {
            "target": AUDIO_FORMAT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "source": {
            "target": AUDIO_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "error": {"target": ERROR_BLOCK},
    },
)

CACHE_TTL = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CacheTTL"),
    shape_type=ShapeType.ENUM,
    members={
        "FIVE_MINUTES": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="5m")],
        },
        "ONE_HOUR": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="1h")],
        },
    },
)

CACHE_POINT_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CachePointType"),
    shape_type=ShapeType.ENUM,
    members={
        "DEFAULT": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="default")],
        }
    },
)

CACHE_POINT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CachePointBlock"),
    members={
        "type": {
            "target": CACHE_POINT_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "ttl": {"target": CACHE_TTL},
    },
)

DOCUMENT_CHAR_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentCharLocation"),
    members={
        "documentIndex": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "start": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "end": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
    },
)

DOCUMENT_CHUNK_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentChunkLocation"),
    members={
        "documentIndex": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "start": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "end": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
    },
)

DOCUMENT_PAGE_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentPageLocation"),
    members={
        "documentIndex": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "start": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "end": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
    },
)

SEARCH_RESULT_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SearchResultLocation"),
    members={
        "searchResultIndex": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "start": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "end": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
    },
)

WEB_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#WebLocation"),
    members={"url": {"target": STRING}, "domain": {"target": STRING}},
)

CITATION_LOCATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationLocation"),
    shape_type=ShapeType.UNION,
    members={
        "web": {"target": WEB_LOCATION},
        "documentChar": {"target": DOCUMENT_CHAR_LOCATION},
        "documentPage": {"target": DOCUMENT_PAGE_LOCATION},
        "documentChunk": {"target": DOCUMENT_CHUNK_LOCATION},
        "searchResultLocation": {"target": SEARCH_RESULT_LOCATION},
    },
)

CITATION_SOURCE_CONTENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationSourceContent"),
    shape_type=ShapeType.UNION,
    members={"text": {"target": STRING}},
)

CITATION_SOURCE_CONTENT_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationSourceContentList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": CITATION_SOURCE_CONTENT}},
)

CITATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Citation"),
    members={
        "title": {"target": STRING},
        "source": {"target": STRING},
        "sourceContent": {"target": CITATION_SOURCE_CONTENT_LIST},
        "location": {"target": CITATION_LOCATION},
    },
)

CITATIONS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Citations"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": CITATION}},
)

CITATION_GENERATED_CONTENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationGeneratedContent"),
    shape_type=ShapeType.UNION,
    members={"text": {"target": STRING}},
)

CITATION_GENERATED_CONTENT_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationGeneratedContentList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": CITATION_GENERATED_CONTENT}},
)

CITATIONS_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationsContentBlock"),
    members={
        "content": {"target": CITATION_GENERATED_CONTENT_LIST},
        "citations": {"target": CITATIONS},
    },
)

CITATIONS_CONFIG = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationsConfig"),
    members={
        "enabled": {
            "target": BOOLEAN,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

DOCUMENT_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentFormat"),
    shape_type=ShapeType.ENUM,
    members={
        "PDF": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pdf")],
        },
        "CSV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="csv")],
        },
        "DOC": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="doc")],
        },
        "DOCX": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="docx")],
        },
        "XLS": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="xls")],
        },
        "XLSX": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="xlsx")],
        },
        "HTML": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="html")],
        },
        "TXT": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="txt")],
        },
        "MD": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="md")],
        },
    },
)

DOCUMENT_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentContentBlock"),
    shape_type=ShapeType.UNION,
    members={"text": {"target": STRING}},
)

DOCUMENT_CONTENT_BLOCKS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentContentBlocks"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": DOCUMENT_CONTENT_BLOCK}},
)

DOCUMENT_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentSource"),
    shape_type=ShapeType.UNION,
    members={
        "bytes": {
            "target": BLOB,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                )
            ],
        },
        "s3Location": {"target": S3_LOCATION},
        "text": {"target": STRING},
        "content": {"target": DOCUMENT_CONTENT_BLOCKS},
    },
)

DOCUMENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#DocumentBlock"),
    members={
        "format": {
            "target": DOCUMENT_FORMAT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value="txt"),
                Trait.new(id=ShapeID("smithy.api#addedDefault")),
            ],
        },
        "name": {
            "target": STRING,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#length"),
                    value=MappingProxyType({"min": 1, "max": 200}),
                ),
            ],
        },
        "source": {
            "target": DOCUMENT_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "context": {"target": STRING},
        "citations": {"target": CITATIONS_CONFIG},
    },
)

GUARDRAIL_CONVERSE_IMAGE_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseImageFormat"),
    shape_type=ShapeType.ENUM,
    members={
        "PNG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="png")],
        },
        "JPEG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="jpeg")],
        },
    },
)

GUARDRAIL_CONVERSE_IMAGE_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseImageSource"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "bytes": {
            "target": BLOB,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                )
            ],
        }
    },
)

GUARDRAIL_CONVERSE_IMAGE_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseImageBlock"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "format": {
            "target": GUARDRAIL_CONVERSE_IMAGE_FORMAT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "source": {
            "target": GUARDRAIL_CONVERSE_IMAGE_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

GUARDRAIL_CONVERSE_CONTENT_QUALIFIER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseContentQualifier"),
    shape_type=ShapeType.ENUM,
    members={
        "GROUNDING_SOURCE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="grounding_source")
            ],
        },
        "QUERY": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="query")],
        },
        "GUARD_CONTENT": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="guard_content")
            ],
        },
    },
)

GUARDRAIL_CONVERSE_CONTENT_QUALIFIER_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseContentQualifierList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_CONVERSE_CONTENT_QUALIFIER}},
)

GUARDRAIL_CONVERSE_TEXT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseTextBlock"),
    members={
        "text": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "qualifiers": {"target": GUARDRAIL_CONVERSE_CONTENT_QUALIFIER_LIST},
    },
)

GUARDRAIL_CONVERSE_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailConverseContentBlock"),
    shape_type=ShapeType.UNION,
    members={
        "text": {"target": GUARDRAIL_CONVERSE_TEXT_BLOCK},
        "image": {"target": GUARDRAIL_CONVERSE_IMAGE_BLOCK},
    },
)

IMAGE_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ImageFormat"),
    shape_type=ShapeType.ENUM,
    members={
        "PNG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="png")],
        },
        "JPEG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="jpeg")],
        },
        "GIF": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="gif")],
        },
        "WEBP": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="webp")],
        },
    },
)

IMAGE_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ImageSource"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "bytes": {
            "target": BLOB,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                )
            ],
        },
        "s3Location": {"target": S3_LOCATION},
    },
)

IMAGE_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ImageBlock"),
    members={
        "format": {
            "target": IMAGE_FORMAT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "source": {
            "target": IMAGE_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "error": {"target": ERROR_BLOCK},
    },
)

REASONING_TEXT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ReasoningTextBlock"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "text": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "signature": {"target": STRING},
    },
)

REASONING_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ReasoningContentBlock"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "reasoningText": {"target": REASONING_TEXT_BLOCK},
        "redactedContent": {"target": BLOB},
    },
)

SEARCH_RESULT_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SearchResultContentBlock"),
    members={
        "text": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

SEARCH_RESULT_CONTENT_BLOCKS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SearchResultContentBlocks"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": SEARCH_RESULT_CONTENT_BLOCK}},
)

SEARCH_RESULT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SearchResultBlock"),
    members={
        "source": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "title": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "content": {
            "target": SEARCH_RESULT_CONTENT_BLOCKS,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "citations": {"target": CITATIONS_CONFIG},
    },
)

VIDEO_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#VideoFormat"),
    shape_type=ShapeType.ENUM,
    members={
        "MKV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mkv")],
        },
        "MOV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mov")],
        },
        "MP4": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mp4")],
        },
        "WEBM": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="webm")],
        },
        "FLV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="flv")],
        },
        "MPEG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mpeg")],
        },
        "MPG": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mpg")],
        },
        "WMV": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="wmv")],
        },
        "THREE_GP": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="three_gp")],
        },
    },
)

VIDEO_SOURCE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#VideoSource"),
    shape_type=ShapeType.UNION,
    members={
        "bytes": {
            "target": BLOB,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                )
            ],
        },
        "s3Location": {"target": S3_LOCATION},
    },
)

VIDEO_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#VideoBlock"),
    members={
        "format": {
            "target": VIDEO_FORMAT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "source": {
            "target": VIDEO_SOURCE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

TOOL_RESULT_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultContentBlock"),
    shape_type=ShapeType.UNION,
    members={
        "json": {"target": DOCUMENT},
        "text": {"target": STRING},
        "image": {"target": IMAGE_BLOCK},
        "document": {"target": DOCUMENT_BLOCK},
        "video": {"target": VIDEO_BLOCK},
        "searchResult": {"target": SEARCH_RESULT_BLOCK},
    },
)

TOOL_RESULT_CONTENT_BLOCKS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultContentBlocks"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": TOOL_RESULT_CONTENT_BLOCK}},
)

TOOL_RESULT_STATUS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultStatus"),
    shape_type=ShapeType.ENUM,
    members={
        "SUCCESS": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="success")],
        },
        "ERROR": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="error")],
        },
    },
)

TOOL_USE_ID = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolUseId"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 64}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z0-9_-]+$"),
    ],
)

TOOL_RESULT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultBlock"),
    members={
        "toolUseId": {
            "target": TOOL_USE_ID,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "content": {
            "target": TOOL_RESULT_CONTENT_BLOCKS,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "status": {"target": TOOL_RESULT_STATUS},
        "type": {"target": STRING},
    },
)

TOOL_NAME = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolName"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 64}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z0-9_-]+$"),
    ],
)

TOOL_USE_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolUseType"),
    shape_type=ShapeType.ENUM,
    members={
        "SERVER_TOOL_USE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="server_tool_use")
            ],
        }
    },
)

TOOL_USE_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolUseBlock"),
    members={
        "toolUseId": {
            "target": TOOL_USE_ID,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "name": {
            "target": TOOL_NAME,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "input": {
            "target": DOCUMENT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "type": {"target": TOOL_USE_TYPE},
    },
)

CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlock"),
    shape_type=ShapeType.UNION,
    members={
        "text": {"target": STRING},
        "image": {"target": IMAGE_BLOCK},
        "document": {"target": DOCUMENT_BLOCK},
        "video": {"target": VIDEO_BLOCK},
        "audio": {"target": AUDIO_BLOCK},
        "toolUse": {"target": TOOL_USE_BLOCK},
        "toolResult": {"target": TOOL_RESULT_BLOCK},
        "guardContent": {"target": GUARDRAIL_CONVERSE_CONTENT_BLOCK},
        "cachePoint": {"target": CACHE_POINT_BLOCK},
        "reasoningContent": {"target": REASONING_CONTENT_BLOCK},
        "citationsContent": {"target": CITATIONS_CONTENT_BLOCK},
        "searchResult": {"target": SEARCH_RESULT_BLOCK},
    },
)

CONTENT_BLOCKS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlocks"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": CONTENT_BLOCK}},
)

CONVERSATION_ROLE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConversationRole"),
    shape_type=ShapeType.ENUM,
    members={
        "USER": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="user")],
        },
        "ASSISTANT": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="assistant")
            ],
        },
    },
)

MESSAGE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Message"),
    members={
        "role": {
            "target": CONVERSATION_ROLE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "content": {
            "target": CONTENT_BLOCKS,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

MESSAGES = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Messages"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": MESSAGE}},
)

CONVERSATIONAL_MODEL_ID = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ConversationalModelId"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 2048}),
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:custom-model-deployment/[a-z0-9]{12})|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|([a-zA-Z0-9-:.]+)|(^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:prompt/[0-9a-zA-Z]{10}(?::[0-9]{1,5})?))$|(^arn:aws:sagemaker:[a-z0-9-]+:[0-9]{12}:endpoint/[a-zA-Z0-9-]+$)|(^arn:aws(-[^:]+)?:bedrock:([0-9a-z-]{1,20}):([0-9]{12}):(default-)?prompt-router/[a-zA-Z0-9-:.]+$)$",
        ),
    ],
)

JSON_SCHEMA_DEFINITION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#JsonSchemaDefinition"),
    members={
        "schema": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "name": {"target": STRING},
        "description": {"target": STRING},
    },
)

OUTPUT_FORMAT_STRUCTURE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#OutputFormatStructure"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={"jsonSchema": {"target": JSON_SCHEMA_DEFINITION}},
)

OUTPUT_FORMAT_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#OutputFormatType"),
    shape_type=ShapeType.ENUM,
    members={
        "JSON_SCHEMA": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="json_schema")
            ],
        }
    },
)

OUTPUT_FORMAT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#OutputFormat"),
    members={
        "type": {
            "target": OUTPUT_FORMAT_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "structure": {
            "target": OUTPUT_FORMAT_STRUCTURE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

OUTPUT_CONFIG = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#OutputConfig"),
    members={"textFormat": {"target": OUTPUT_FORMAT}},
)

PERFORMANCE_CONFIG_LATENCY = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#PerformanceConfigLatency"),
    shape_type=ShapeType.ENUM,
    members={
        "STANDARD": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="standard")],
        },
        "OPTIMIZED": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="optimized")
            ],
        },
    },
)

PERFORMANCE_CONFIGURATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#PerformanceConfiguration"),
    members={
        "latency": {
            "target": PERFORMANCE_CONFIG_LATENCY,
            "traits": [Trait.new(id=ShapeID("smithy.api#default"), value="standard")],
        }
    },
)

PROMPT_VARIABLE_VALUES = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#PromptVariableValues"),
    shape_type=ShapeType.UNION,
    members={"text": {"target": STRING}},
)

PROMPT_VARIABLE_MAP = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#PromptVariableMap"),
    shape_type=ShapeType.MAP,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={"key": {"target": STRING}, "value": {"target": PROMPT_VARIABLE_VALUES}},
)

REQUEST_METADATA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#RequestMetadata"),
    shape_type=ShapeType.MAP,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 16}),
        ),
        Trait.new(id=ShapeID("smithy.api#sensitive")),
    ],
    members={
        "key": {
            "target": STRING,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"),
                    value=MappingProxyType({"min": 1, "max": 256}),
                ),
                Trait.new(
                    id=ShapeID("smithy.api#pattern"),
                    value="^[a-zA-Z0-9\\s:_@$#=/+,-.]{1,256}$",
                ),
            ],
        },
        "value": {
            "target": STRING,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"),
                    value=MappingProxyType({"min": 0, "max": 256}),
                ),
                Trait.new(
                    id=ShapeID("smithy.api#pattern"),
                    value="^[a-zA-Z0-9\\s:_@$#=/+,-.]{0,256}$",
                ),
            ],
        },
    },
)

SERVICE_TIER_TYPE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ServiceTierType"),
    shape_type=ShapeType.ENUM,
    members={
        "PRIORITY": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="priority")],
        },
        "DEFAULT": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="default")],
        },
        "FLEX": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="flex")],
        },
        "RESERVED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="reserved")],
        },
    },
)

SERVICE_TIER = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ServiceTier"),
    members={
        "type": {
            "target": SERVICE_TIER_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

SYSTEM_CONTENT_BLOCK = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SystemContentBlock"),
    shape_type=ShapeType.UNION,
    members={
        "text": {"target": NON_EMPTY_STRING},
        "guardContent": {"target": GUARDRAIL_CONVERSE_CONTENT_BLOCK},
        "cachePoint": {"target": CACHE_POINT_BLOCK},
    },
)

SYSTEM_CONTENT_BLOCKS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SystemContentBlocks"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": SYSTEM_CONTENT_BLOCK}},
)

ANY_TOOL_CHOICE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AnyToolChoice")
)

AUTO_TOOL_CHOICE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#AutoToolChoice")
)

SPECIFIC_TOOL_CHOICE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SpecificToolChoice"),
    members={
        "name": {
            "target": TOOL_NAME,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

TOOL_CHOICE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolChoice"),
    shape_type=ShapeType.UNION,
    members={
        "auto": {"target": AUTO_TOOL_CHOICE},
        "any": {"target": ANY_TOOL_CHOICE},
        "tool": {"target": SPECIFIC_TOOL_CHOICE},
    },
)

SYSTEM_TOOL = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#SystemTool"),
    members={
        "name": {
            "target": TOOL_NAME,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

TOOL_INPUT_SCHEMA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolInputSchema"),
    shape_type=ShapeType.UNION,
    members={"json": {"target": DOCUMENT}},
)

TOOL_SPECIFICATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolSpecification"),
    members={
        "name": {
            "target": TOOL_NAME,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "description": {"target": NON_EMPTY_STRING},
        "inputSchema": {
            "target": TOOL_INPUT_SCHEMA,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "strict": {"target": BOOLEAN},
    },
)

TOOL = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Tool"),
    shape_type=ShapeType.UNION,
    members={
        "toolSpec": {"target": TOOL_SPECIFICATION},
        "systemTool": {"target": SYSTEM_TOOL},
        "cachePoint": {"target": CACHE_POINT_BLOCK},
    },
)

TOOLS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Tools"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": TOOL}},
)

TOOL_CONFIGURATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolConfiguration"),
    members={
        "tools": {
            "target": TOOLS,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"min": 1})
                ),
            ],
        },
        "toolChoice": {"target": TOOL_CHOICE},
    },
)

CONVERSE_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ConverseRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "modelId": {
            "target": CONVERSATIONAL_MODEL_ID,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "messages": {"target": MESSAGES},
        "system": {"target": SYSTEM_CONTENT_BLOCKS},
        "inferenceConfig": {"target": INFERENCE_CONFIGURATION},
        "toolConfig": {"target": TOOL_CONFIGURATION},
        "guardrailConfig": {"target": GUARDRAIL_CONFIGURATION},
        "additionalModelRequestFields": {"target": DOCUMENT},
        "promptVariables": {"target": PROMPT_VARIABLE_MAP},
        "additionalModelResponseFieldPaths": {
            "target": ADDITIONAL_MODEL_RESPONSE_FIELD_PATHS,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 10})
                )
            ],
        },
        "requestMetadata": {"target": REQUEST_METADATA},
        "performanceConfig": {"target": PERFORMANCE_CONFIGURATION},
        "serviceTier": {"target": SERVICE_TIER},
        "outputConfig": {"target": OUTPUT_CONFIG},
    },
)

CONVERSE_METRICS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseMetrics"),
    members={
        "latencyMs": {
            "target": LONG,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

CONVERSE_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseOutput"),
    shape_type=ShapeType.UNION,
    members={"message": {"target": MESSAGE}},
)

STOP_REASON = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#StopReason"),
    shape_type=ShapeType.ENUM,
    members={
        "END_TURN": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="end_turn")],
        },
        "TOOL_USE": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="tool_use")],
        },
        "MAX_TOKENS": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="max_tokens")
            ],
        },
        "STOP_SEQUENCE": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="stop_sequence")
            ],
        },
        "GUARDRAIL_INTERVENED": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="guardrail_intervened"
                )
            ],
        },
        "CONTENT_FILTERED": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="content_filtered")
            ],
        },
        "MALFORMED_MODEL_OUTPUT": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="malformed_model_output"
                )
            ],
        },
        "MALFORMED_TOOL_USE": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"), value="malformed_tool_use"
                )
            ],
        },
        "MODEL_CONTEXT_WINDOW_EXCEEDED": {
            "target": UNIT,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#enumValue"),
                    value="model_context_window_exceeded",
                )
            ],
        },
    },
)

GUARDRAIL_ASSESSMENT_MAP = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAssessmentMap"),
    shape_type=ShapeType.MAP,
    members={"key": {"target": STRING}, "value": {"target": GUARDRAIL_ASSESSMENT}},
)

MODEL_OUTPUTS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ModelOutputs"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": GUARDRAIL_OUTPUT_TEXT}},
)

GUARDRAIL_ASSESSMENT_LIST_MAP = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailAssessmentListMap"),
    shape_type=ShapeType.MAP,
    members={"key": {"target": STRING}, "value": {"target": GUARDRAIL_ASSESSMENT_LIST}},
)

GUARDRAIL_TRACE_ASSESSMENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailTraceAssessment"),
    members={
        "modelOutput": {"target": MODEL_OUTPUTS},
        "inputAssessment": {"target": GUARDRAIL_ASSESSMENT_MAP},
        "outputAssessments": {"target": GUARDRAIL_ASSESSMENT_LIST_MAP},
        "actionReason": {"target": STRING},
    },
)

INVOKED_MODEL_ID = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokedModelId"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2})|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):inference-profile/[a-zA-Z0-9-:.]+)$",
        )
    ],
)

PROMPT_ROUTER_TRACE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#PromptRouterTrace"),
    members={"invokedModelId": {"target": INVOKED_MODEL_ID}},
)

CONVERSE_TRACE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseTrace"),
    members={
        "guardrail": {"target": GUARDRAIL_TRACE_ASSESSMENT},
        "promptRouter": {"target": PROMPT_ROUTER_TRACE},
    },
)

CACHE_DETAIL = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CacheDetail"),
    members={
        "ttl": {
            "target": CACHE_TTL,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "inputTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                ),
            ],
        },
    },
)

CACHE_DETAILS_LIST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CacheDetailsList"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": CACHE_DETAIL}},
)

TOKEN_USAGE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#TokenUsage"),
    members={
        "inputTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                ),
            ],
        },
        "outputTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                ),
            ],
        },
        "totalTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                ),
            ],
        },
        "cacheReadInputTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "cacheWriteInputTokens": {
            "target": INTEGER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})
                )
            ],
        },
        "cacheDetails": {"target": CACHE_DETAILS_LIST},
    },
)

CONVERSE_OPERATION_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseOperationOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ConverseResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "output": {
            "target": CONVERSE_OUTPUT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "stopReason": {
            "target": STOP_REASON,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "usage": {
            "target": TOKEN_USAGE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "metrics": {
            "target": CONVERSE_METRICS,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "additionalModelResponseFields": {"target": DOCUMENT},
        "trace": {"target": CONVERSE_TRACE},
        "performanceConfig": {"target": PERFORMANCE_CONFIGURATION},
        "serviceTier": {"target": SERVICE_TIER},
    },
)

STATUS_CODE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#StatusCode"),
    shape_type=ShapeType.INTEGER,
    traits=[
        Trait.new(id=ShapeID("smithy.api#box")),
        Trait.new(
            id=ShapeID("smithy.api#range"),
            value=MappingProxyType({"min": 100, "max": 599}),
        ),
    ],
)

MODEL_ERROR_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ModelErrorException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=424),
    ],
    members={
        "message": {"target": NON_BLANK_STRING},
        "originalStatusCode": {"target": STATUS_CODE},
        "resourceName": {"target": NON_BLANK_STRING},
    },
)

MODEL_NOT_READY_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ModelNotReadyException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=429),
        Trait.new(id=ShapeID("smithy.api#retryable")),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

MODEL_TIMEOUT_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ModelTimeoutException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=408),
    ],
    members={"message": {"target": NON_BLANK_STRING}},
)

CONVERSE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#Converse"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {"code": 200, "method": "POST", "uri": "/model/{modelId}/converse"}
            ),
        )
    ],
)

GUARDRAIL_STREAM_PROCESSING_MODE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailStreamProcessingMode"),
    shape_type=ShapeType.ENUM,
    members={
        "SYNC": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sync")],
        },
        "ASYNC": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="async")],
        },
    },
)

GUARDRAIL_STREAM_CONFIGURATION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#GuardrailStreamConfiguration"),
    members={
        "guardrailIdentifier": {
            "target": GUARDRAIL_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value=""),
                Trait.new(id=ShapeID("smithy.api#addedDefault")),
            ],
        },
        "guardrailVersion": {
            "target": GUARDRAIL_VERSION,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value=""),
                Trait.new(id=ShapeID("smithy.api#addedDefault")),
            ],
        },
        "trace": {
            "target": GUARDRAIL_TRACE,
            "traits": [Trait.new(id=ShapeID("smithy.api#default"), value="disabled")],
        },
        "streamProcessingMode": {
            "target": GUARDRAIL_STREAM_PROCESSING_MODE,
            "traits": [Trait.new(id=ShapeID("smithy.api#default"), value="sync")],
        },
    },
)

CONVERSE_STREAM_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStreamInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ConverseStreamRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "modelId": {
            "target": CONVERSATIONAL_MODEL_ID,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "messages": {"target": MESSAGES},
        "system": {"target": SYSTEM_CONTENT_BLOCKS},
        "inferenceConfig": {"target": INFERENCE_CONFIGURATION},
        "toolConfig": {"target": TOOL_CONFIGURATION},
        "guardrailConfig": {"target": GUARDRAIL_STREAM_CONFIGURATION},
        "additionalModelRequestFields": {"target": DOCUMENT},
        "promptVariables": {"target": PROMPT_VARIABLE_MAP},
        "additionalModelResponseFieldPaths": {
            "target": ADDITIONAL_MODEL_RESPONSE_FIELD_PATHS,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 10})
                )
            ],
        },
        "requestMetadata": {"target": REQUEST_METADATA},
        "performanceConfig": {"target": PERFORMANCE_CONFIGURATION},
        "serviceTier": {"target": SERVICE_TIER},
        "outputConfig": {"target": OUTPUT_CONFIG},
    },
)

NON_NEGATIVE_INTEGER = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#NonNegativeInteger"),
    shape_type=ShapeType.INTEGER,
    traits=[
        Trait.new(id=ShapeID("smithy.api#box")),
        Trait.new(id=ShapeID("smithy.api#range"), value=MappingProxyType({"min": 0})),
    ],
)

CITATION_SOURCE_CONTENT_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationSourceContentDelta"),
    members={"text": {"target": STRING}},
)

CITATION_SOURCE_CONTENT_LIST_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationSourceContentListDelta"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": CITATION_SOURCE_CONTENT_DELTA}},
)

CITATIONS_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CitationsDelta"),
    members={
        "title": {"target": STRING},
        "source": {"target": STRING},
        "sourceContent": {"target": CITATION_SOURCE_CONTENT_LIST_DELTA},
        "location": {"target": CITATION_LOCATION},
    },
)

IMAGE_BLOCK_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ImageBlockDelta"),
    members={"source": {"target": IMAGE_SOURCE}, "error": {"target": ERROR_BLOCK}},
)

REASONING_CONTENT_BLOCK_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ReasoningContentBlockDelta"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={
        "text": {"target": STRING},
        "redactedContent": {"target": BLOB},
        "signature": {"target": STRING},
    },
)

TOOL_RESULT_BLOCK_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultBlockDelta"),
    shape_type=ShapeType.UNION,
    members={"text": {"target": STRING}, "json": {"target": DOCUMENT}},
)

TOOL_RESULT_BLOCKS_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultBlocksDelta"),
    shape_type=ShapeType.LIST,
    members={"member": {"target": TOOL_RESULT_BLOCK_DELTA}},
)

TOOL_USE_BLOCK_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolUseBlockDelta"),
    members={
        "input": {
            "target": STRING,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

CONTENT_BLOCK_DELTA = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlockDelta"),
    shape_type=ShapeType.UNION,
    members={
        "text": {"target": STRING},
        "toolUse": {"target": TOOL_USE_BLOCK_DELTA},
        "toolResult": {"target": TOOL_RESULT_BLOCKS_DELTA},
        "reasoningContent": {"target": REASONING_CONTENT_BLOCK_DELTA},
        "citation": {"target": CITATIONS_DELTA},
        "image": {"target": IMAGE_BLOCK_DELTA},
    },
)

CONTENT_BLOCK_DELTA_EVENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlockDeltaEvent"),
    members={
        "delta": {
            "target": CONTENT_BLOCK_DELTA,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "contentBlockIndex": {
            "target": NON_NEGATIVE_INTEGER,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

IMAGE_BLOCK_START = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ImageBlockStart"),
    members={
        "format": {
            "target": IMAGE_FORMAT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

TOOL_RESULT_BLOCK_START = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolResultBlockStart"),
    members={
        "toolUseId": {
            "target": TOOL_USE_ID,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "type": {"target": STRING},
        "status": {"target": TOOL_RESULT_STATUS},
    },
)

TOOL_USE_BLOCK_START = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ToolUseBlockStart"),
    members={
        "toolUseId": {
            "target": TOOL_USE_ID,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "name": {
            "target": TOOL_NAME,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "type": {"target": TOOL_USE_TYPE},
    },
)

CONTENT_BLOCK_START = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlockStart"),
    shape_type=ShapeType.UNION,
    members={
        "toolUse": {"target": TOOL_USE_BLOCK_START},
        "toolResult": {"target": TOOL_RESULT_BLOCK_START},
        "image": {"target": IMAGE_BLOCK_START},
    },
)

CONTENT_BLOCK_START_EVENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlockStartEvent"),
    members={
        "start": {
            "target": CONTENT_BLOCK_START,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "contentBlockIndex": {
            "target": NON_NEGATIVE_INTEGER,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

CONTENT_BLOCK_STOP_EVENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ContentBlockStopEvent"),
    members={
        "contentBlockIndex": {
            "target": NON_NEGATIVE_INTEGER,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

MESSAGE_START_EVENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#MessageStartEvent"),
    members={
        "role": {
            "target": CONVERSATION_ROLE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

MESSAGE_STOP_EVENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#MessageStopEvent"),
    members={
        "stopReason": {
            "target": STOP_REASON,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "additionalModelResponseFields": {"target": DOCUMENT},
    },
)

CONVERSE_STREAM_METRICS = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStreamMetrics"),
    members={
        "latencyMs": {
            "target": LONG,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

CONVERSE_STREAM_TRACE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStreamTrace"),
    members={
        "guardrail": {"target": GUARDRAIL_TRACE_ASSESSMENT},
        "promptRouter": {"target": PROMPT_ROUTER_TRACE},
    },
)

CONVERSE_STREAM_METADATA_EVENT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStreamMetadataEvent"),
    members={
        "usage": {
            "target": TOKEN_USAGE,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "metrics": {
            "target": CONVERSE_STREAM_METRICS,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
        "trace": {"target": CONVERSE_STREAM_TRACE},
        "performanceConfig": {"target": PERFORMANCE_CONFIGURATION},
        "serviceTier": {"target": SERVICE_TIER},
    },
)

MODEL_STREAM_ERROR_EXCEPTION = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ModelStreamErrorException"),
    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=424),
    ],
    members={
        "message": {"target": NON_BLANK_STRING},
        "originalStatusCode": {"target": STATUS_CODE},
        "originalMessage": {"target": NON_BLANK_STRING},
    },
)

CONVERSE_STREAM_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStreamOutput"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#streaming"))],
    members={
        "messageStart": {"target": MESSAGE_START_EVENT},
        "contentBlockStart": {"target": CONTENT_BLOCK_START_EVENT},
        "contentBlockDelta": {"target": CONTENT_BLOCK_DELTA_EVENT},
        "contentBlockStop": {"target": CONTENT_BLOCK_STOP_EVENT},
        "messageStop": {"target": MESSAGE_STOP_EVENT},
        "metadata": {"target": CONVERSE_STREAM_METADATA_EVENT},
        "internalServerException": {"target": INTERNAL_SERVER_EXCEPTION},
        "modelStreamErrorException": {"target": MODEL_STREAM_ERROR_EXCEPTION},
        "validationException": {"target": VALIDATION_EXCEPTION},
        "throttlingException": {"target": THROTTLING_EXCEPTION},
        "serviceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION},
    },
)

CONVERSE_STREAM_OPERATION_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStreamOperationOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#ConverseStreamResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "stream": {
            "target": CONVERSE_STREAM_OUTPUT,
            "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))],
        }
    },
)

CONVERSE_STREAM = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseStream"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {
                    "code": 200,
                    "method": "POST",
                    "uri": "/model/{modelId}/converse-stream",
                }
            ),
        )
    ],
)

MIME_TYPE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#MimeType"), shape_type=ShapeType.STRING
)

BODY = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#Body"),
    shape_type=ShapeType.BLOB,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 25000000})
        ),
        Trait.new(id=ShapeID("smithy.api#sensitive")),
    ],
)

INVOKE_MODEL_IDENTIFIER = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelIdentifier"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 2048}),
        ),
        Trait.new(
            id=ShapeID("smithy.api#pattern"),
            value="^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:custom-model-deployment/[a-z0-9]{12})|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+)))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][_-]?)+)|([a-zA-Z0-9-:.]+)$|(^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:prompt/[0-9a-zA-Z]{10}(?::[0-9]{1,5})?))$|(^arn:aws:sagemaker:[a-z0-9-]+:[0-9]{12}:endpoint/[a-zA-Z0-9-]+$)|(^arn:aws(-[^:]+)?:bedrock:([0-9a-z-]{1,20}):([0-9]{12}):(default-)?prompt-router/[a-zA-Z0-9-:.]+$)$",
        ),
    ],
)

TRACE = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#Trace"),
    shape_type=ShapeType.ENUM,
    members={
        "ENABLED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ENABLED")],
        },
        "DISABLED": {
            "target": UNIT,
            "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="DISABLED")],
        },
        "ENABLED_FULL": {
            "target": UNIT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#enumValue"), value="ENABLED_FULL")
            ],
        },
    },
)

INVOKE_MODEL_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#InvokeModelRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "body": {
            "target": BODY,
            "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))],
        },
        "contentType": {
            "target": MIME_TYPE,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpHeader"), value="Content-Type")
            ],
        },
        "accept": {
            "target": MIME_TYPE,
            "traits": [Trait.new(id=ShapeID("smithy.api#httpHeader"), value="Accept")],
        },
        "modelId": {
            "target": INVOKE_MODEL_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "trace": {
            "target": TRACE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"), value="X-Amzn-Bedrock-Trace"
                )
            ],
        },
        "guardrailIdentifier": {
            "target": GUARDRAIL_IDENTIFIER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-GuardrailIdentifier",
                )
            ],
        },
        "guardrailVersion": {
            "target": GUARDRAIL_VERSION,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-GuardrailVersion",
                )
            ],
        },
        "performanceConfigLatency": {
            "target": PERFORMANCE_CONFIG_LATENCY,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value="standard"),
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-PerformanceConfig-Latency",
                ),
            ],
        },
        "serviceTier": {
            "target": SERVICE_TIER_TYPE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-Service-Tier",
                )
            ],
        },
    },
)

INVOKE_MODEL_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#InvokeModelResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "body": {
            "target": BODY,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpPayload")),
            ],
        },
        "contentType": {
            "target": MIME_TYPE,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpHeader"), value="Content-Type"),
                Trait.new(id=ShapeID("smithy.api#required")),
            ],
        },
        "performanceConfigLatency": {
            "target": PERFORMANCE_CONFIG_LATENCY,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-PerformanceConfig-Latency",
                )
            ],
        },
        "serviceTier": {
            "target": SERVICE_TIER_TYPE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-Service-Tier",
                )
            ],
        },
    },
)

INVOKE_MODEL = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModel"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {"code": 200, "method": "POST", "uri": "/model/{modelId}/invoke"}
            ),
        )
    ],
)

PART_BODY = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#PartBody"),
    shape_type=ShapeType.BLOB,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"), value=MappingProxyType({"max": 1000000})
        ),
        Trait.new(id=ShapeID("smithy.api#sensitive")),
    ],
)

BIDIRECTIONAL_INPUT_PAYLOAD_PART = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#BidirectionalInputPayloadPart"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={"bytes": {"target": PART_BODY}},
)

INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamInput"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#streaming"))],
    members={"chunk": {"target": BIDIRECTIONAL_INPUT_PAYLOAD_PART}},
)

INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM_OPERATION_INPUT = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamOperationInput"
    ),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "modelId": {
            "target": INVOKE_MODEL_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "body": {
            "target": INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM_INPUT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpPayload")),
            ],
        },
    },
)

BIDIRECTIONAL_OUTPUT_PAYLOAD_PART = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#BidirectionalOutputPayloadPart"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={"bytes": {"target": PART_BODY}},
)

INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamOutput"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#streaming"))],
    members={
        "chunk": {"target": BIDIRECTIONAL_OUTPUT_PAYLOAD_PART},
        "internalServerException": {"target": INTERNAL_SERVER_EXCEPTION},
        "modelStreamErrorException": {"target": MODEL_STREAM_ERROR_EXCEPTION},
        "validationException": {"target": VALIDATION_EXCEPTION},
        "throttlingException": {"target": THROTTLING_EXCEPTION},
        "modelTimeoutException": {"target": MODEL_TIMEOUT_EXCEPTION},
        "serviceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION},
    },
)

INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM_OPERATION_OUTPUT = Schema.collection(
    id=ShapeID(
        "com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamOperationOutput"
    ),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStreamResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "body": {
            "target": INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM_OUTPUT,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpPayload")),
            ],
        }
    },
)

INVOKE_MODEL_WITH_BIDIRECTIONAL_STREAM = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelWithBidirectionalStream"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {
                    "code": 200,
                    "method": "POST",
                    "uri": "/model/{modelId}/invoke-with-bidirectional-stream",
                }
            ),
        )
    ],
)

INVOKE_MODEL_WITH_RESPONSE_STREAM_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "body": {
            "target": BODY,
            "traits": [Trait.new(id=ShapeID("smithy.api#httpPayload"))],
        },
        "contentType": {
            "target": MIME_TYPE,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#httpHeader"), value="Content-Type")
            ],
        },
        "accept": {
            "target": MIME_TYPE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"), value="X-Amzn-Bedrock-Accept"
                )
            ],
        },
        "modelId": {
            "target": INVOKE_MODEL_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "trace": {
            "target": TRACE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"), value="X-Amzn-Bedrock-Trace"
                )
            ],
        },
        "guardrailIdentifier": {
            "target": GUARDRAIL_IDENTIFIER,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-GuardrailIdentifier",
                )
            ],
        },
        "guardrailVersion": {
            "target": GUARDRAIL_VERSION,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-GuardrailVersion",
                )
            ],
        },
        "performanceConfigLatency": {
            "target": PERFORMANCE_CONFIG_LATENCY,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#default"), value="standard"),
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-PerformanceConfig-Latency",
                ),
            ],
        },
        "serviceTier": {
            "target": SERVICE_TIER_TYPE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-Service-Tier",
                )
            ],
        },
    },
)

PAYLOAD_PART = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#PayloadPart"),
    traits=[Trait.new(id=ShapeID("smithy.api#sensitive"))],
    members={"bytes": {"target": PART_BODY}},
)

RESPONSE_STREAM = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ResponseStream"),
    shape_type=ShapeType.UNION,
    traits=[Trait.new(id=ShapeID("smithy.api#streaming"))],
    members={
        "chunk": {"target": PAYLOAD_PART},
        "internalServerException": {"target": INTERNAL_SERVER_EXCEPTION},
        "modelStreamErrorException": {"target": MODEL_STREAM_ERROR_EXCEPTION},
        "validationException": {"target": VALIDATION_EXCEPTION},
        "throttlingException": {"target": THROTTLING_EXCEPTION},
        "modelTimeoutException": {"target": MODEL_TIMEOUT_EXCEPTION},
        "serviceUnavailableException": {"target": SERVICE_UNAVAILABLE_EXCEPTION},
    },
)

INVOKE_MODEL_WITH_RESPONSE_STREAM_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "body": {
            "target": RESPONSE_STREAM,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpPayload")),
            ],
        },
        "contentType": {
            "target": MIME_TYPE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-Content-Type",
                ),
                Trait.new(id=ShapeID("smithy.api#required")),
            ],
        },
        "performanceConfigLatency": {
            "target": PERFORMANCE_CONFIG_LATENCY,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-PerformanceConfig-Latency",
                )
            ],
        },
        "serviceTier": {
            "target": SERVICE_TIER_TYPE,
            "traits": [
                Trait.new(
                    id=ShapeID("smithy.api#httpHeader"),
                    value="X-Amzn-Bedrock-Service-Tier",
                )
            ],
        },
    },
)

INVOKE_MODEL_WITH_RESPONSE_STREAM = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelWithResponseStream"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {
                    "code": 200,
                    "method": "POST",
                    "uri": "/model/{modelId}/invoke-with-response-stream",
                }
            ),
        )
    ],
)

CONVERSE_TOKENS_REQUEST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#ConverseTokensRequest"),
    members={
        "messages": {"target": MESSAGES},
        "system": {"target": SYSTEM_CONTENT_BLOCKS},
        "toolConfig": {"target": TOOL_CONFIGURATION},
        "additionalModelRequestFields": {"target": DOCUMENT},
    },
)

INVOKE_MODEL_TOKENS_REQUEST = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#InvokeModelTokensRequest"),
    members={
        "body": {
            "target": BODY,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

COUNT_TOKENS_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CountTokensInput"),
    shape_type=ShapeType.UNION,
    members={
        "invokeModel": {"target": INVOKE_MODEL_TOKENS_REQUEST},
        "converse": {"target": CONVERSE_TOKENS_REQUEST},
    },
)

FOUNDATION_MODEL_VERSION_IDENTIFIER = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#FoundationModelVersionIdentifier"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#length"),
            value=MappingProxyType({"min": 1, "max": 256}),
        ),
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[a-zA-Z_\\.\\-/0-9:]+$"),
    ],
)

COUNT_TOKENS_OPERATION_INPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CountTokensOperationInput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#CountTokensRequest",
        ),
        Trait.new(id=ShapeID("smithy.api#input")),
    ],
    members={
        "modelId": {
            "target": FOUNDATION_MODEL_VERSION_IDENTIFIER,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),
            ],
        },
        "input": {
            "target": COUNT_TOKENS_INPUT,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        },
    },
)

COUNT_TOKENS_OUTPUT = Schema.collection(
    id=ShapeID("com.amazonaws.bedrockruntime#CountTokensOutput"),
    traits=[
        Trait.new(
            id=ShapeID("smithy.synthetic#originalShapeId"),
            value="com.amazonaws.bedrockruntime#CountTokensResponse",
        ),
        Trait.new(id=ShapeID("smithy.api#output")),
    ],
    members={
        "inputTokens": {
            "target": INTEGER,
            "traits": [Trait.new(id=ShapeID("smithy.api#required"))],
        }
    },
)

COUNT_TOKENS = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#CountTokens"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(
            id=ShapeID("smithy.api#http"),
            value=MappingProxyType(
                {"code": 200, "method": "POST", "uri": "/model/{modelId}/count-tokens"}
            ),
        ),
        Trait.new(id=ShapeID("smithy.api#readonly")),
    ],
)

AMAZON_BEDROCK_FRONTEND_SERVICE = Schema(
    id=ShapeID("com.amazonaws.bedrockruntime#AmazonBedrockFrontendService"),
    shape_type=ShapeType.SERVICE,
    traits=[
        Trait.new(
            id=ShapeID("aws.auth#sigv4"), value=MappingProxyType({"name": "bedrock"})
        ),
        Trait.new(id=ShapeID("smithy.api#title"), value="Amazon Bedrock Runtime"),
        Trait.new(
            id=ShapeID("smithy.rules#endpointTests"),
            value=MappingProxyType(
                {
                    "testCases": (
                        MappingProxyType(
                            {
                                "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.us-east-1.api.aws"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": True,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.us-east-1.amazonaws.com"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.us-east-1.api.aws"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": True,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.us-east-1.amazonaws.com"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.cn-north-1.api.amazonwebservices.com.cn"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "cn-north-1",
                                        "UseFIPS": True,
                                        "UseDualStack": True,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.cn-north-1.amazonaws.com.cn"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "cn-north-1",
                                        "UseFIPS": True,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.cn-north-1.api.amazonwebservices.com.cn"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "cn-north-1",
                                        "UseFIPS": False,
                                        "UseDualStack": True,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.cn-north-1.amazonaws.com.cn"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "cn-north-1",
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.us-gov-east-1.api.aws"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-gov-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": True,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.us-gov-east-1.amazonaws.com"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-gov-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.us-gov-east-1.api.aws"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-gov-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": True,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.us-gov-east-1.amazonaws.com"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-gov-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.us-iso-east-1.c2s.ic.gov"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-iso-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.us-iso-east-1.c2s.ic.gov"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-iso-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime-fips.us-isob-east-1.sc2s.sgov.gov"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-isob-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {
                                                "url": "https://bedrock-runtime.us-isob-east-1.sc2s.sgov.gov"
                                            }
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-isob-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {"url": "https://example.com"}
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                        "Endpoint": "https://example.com",
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "endpoint": MappingProxyType(
                                            {"url": "https://example.com"}
                                        )
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "UseFIPS": False,
                                        "UseDualStack": False,
                                        "Endpoint": "https://example.com",
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For custom endpoint with fips enabled and dualstack disabled",
                                "expect": MappingProxyType(
                                    {
                                        "error": "Invalid Configuration: FIPS and custom endpoint are not supported"
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": True,
                                        "UseDualStack": False,
                                        "Endpoint": "https://example.com",
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "For custom endpoint with fips disabled and dualstack enabled",
                                "expect": MappingProxyType(
                                    {
                                        "error": "Invalid Configuration: Dualstack and custom endpoint are not supported"
                                    }
                                ),
                                "params": MappingProxyType(
                                    {
                                        "Region": "us-east-1",
                                        "UseFIPS": False,
                                        "UseDualStack": True,
                                        "Endpoint": "https://example.com",
                                    }
                                ),
                            }
                        ),
                        MappingProxyType(
                            {
                                "documentation": "Missing region",
                                "expect": MappingProxyType(
                                    {"error": "Invalid Configuration: Missing Region"}
                                ),
                            }
                        ),
                    ),
                    "version": "1.0",
                }
            ),
        ),
        Trait.new(
            id=ShapeID("smithy.rules#endpointRuleSet"),
            value=MappingProxyType(
                {
                    "version": "1.0",
                    "parameters": MappingProxyType(
                        {
                            "Region": MappingProxyType(
                                {
                                    "builtIn": "AWS::Region",
                                    "required": False,
                                    "documentation": "The AWS region used to dispatch the request.",
                                    "type": "string",
                                }
                            ),
                            "UseDualStack": MappingProxyType(
                                {
                                    "builtIn": "AWS::UseDualStack",
                                    "required": True,
                                    "default": False,
                                    "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.",
                                    "type": "boolean",
                                }
                            ),
                            "UseFIPS": MappingProxyType(
                                {
                                    "builtIn": "AWS::UseFIPS",
                                    "required": True,
                                    "default": False,
                                    "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.",
                                    "type": "boolean",
                                }
                            ),
                            "Endpoint": MappingProxyType(
                                {
                                    "builtIn": "SDK::Endpoint",
                                    "required": False,
                                    "documentation": "Override the endpoint used to send this request",
                                    "type": "string",
                                }
                            ),
                        }
                    ),
                    "rules": (
                        MappingProxyType(
                            {
                                "conditions": (
                                    MappingProxyType(
                                        {
                                            "fn": "isSet",
                                            "argv": (
                                                MappingProxyType({"ref": "Endpoint"}),
                                            ),
                                        }
                                    ),
                                ),
                                "rules": (
                                    MappingProxyType(
                                        {
                                            "conditions": (
                                                MappingProxyType(
                                                    {
                                                        "fn": "booleanEquals",
                                                        "argv": (
                                                            MappingProxyType(
                                                                {"ref": "UseFIPS"}
                                                            ),
                                                            True,
                                                        ),
                                                    }
                                                ),
                                            ),
                                            "error": "Invalid Configuration: FIPS and custom endpoint are not supported",
                                            "type": "error",
                                        }
                                    ),
                                    MappingProxyType(
                                        {
                                            "conditions": (),
                                            "rules": (
                                                MappingProxyType(
                                                    {
                                                        "conditions": (
                                                            MappingProxyType(
                                                                {
                                                                    "fn": "booleanEquals",
                                                                    "argv": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "ref": "UseDualStack"
                                                                            }
                                                                        ),
                                                                        True,
                                                                    ),
                                                                }
                                                            ),
                                                        ),
                                                        "error": "Invalid Configuration: Dualstack and custom endpoint are not supported",
                                                        "type": "error",
                                                    }
                                                ),
                                                MappingProxyType(
                                                    {
                                                        "conditions": (),
                                                        "endpoint": MappingProxyType(
                                                            {
                                                                "url": MappingProxyType(
                                                                    {"ref": "Endpoint"}
                                                                ),
                                                                "properties": MappingProxyType(
                                                                    {}
                                                                ),
                                                                "headers": MappingProxyType(
                                                                    {}
                                                                ),
                                                            }
                                                        ),
                                                        "type": "endpoint",
                                                    }
                                                ),
                                            ),
                                            "type": "tree",
                                        }
                                    ),
                                ),
                                "type": "tree",
                            }
                        ),
                        MappingProxyType(
                            {
                                "conditions": (),
                                "rules": (
                                    MappingProxyType(
                                        {
                                            "conditions": (
                                                MappingProxyType(
                                                    {
                                                        "fn": "isSet",
                                                        "argv": (
                                                            MappingProxyType(
                                                                {"ref": "Region"}
                                                            ),
                                                        ),
                                                    }
                                                ),
                                            ),
                                            "rules": (
                                                MappingProxyType(
                                                    {
                                                        "conditions": (
                                                            MappingProxyType(
                                                                {
                                                                    "fn": "aws.partition",
                                                                    "argv": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "ref": "Region"
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "assign": "PartitionResult",
                                                                }
                                                            ),
                                                        ),
                                                        "rules": (
                                                            MappingProxyType(
                                                                {
                                                                    "conditions": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "fn": "booleanEquals",
                                                                                "argv": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "ref": "UseFIPS"
                                                                                        }
                                                                                    ),
                                                                                    True,
                                                                                ),
                                                                            }
                                                                        ),
                                                                        MappingProxyType(
                                                                            {
                                                                                "fn": "booleanEquals",
                                                                                "argv": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "ref": "UseDualStack"
                                                                                        }
                                                                                    ),
                                                                                    True,
                                                                                ),
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "rules": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "fn": "booleanEquals",
                                                                                            "argv": (
                                                                                                True,
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "fn": "getAttr",
                                                                                                        "argv": (
                                                                                                            MappingProxyType(
                                                                                                                {
                                                                                                                    "ref": "PartitionResult"
                                                                                                                }
                                                                                                            ),
                                                                                                            "supportsFIPS",
                                                                                                        ),
                                                                                                    }
                                                                                                ),
                                                                                            ),
                                                                                        }
                                                                                    ),
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "fn": "booleanEquals",
                                                                                            "argv": (
                                                                                                True,
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "fn": "getAttr",
                                                                                                        "argv": (
                                                                                                            MappingProxyType(
                                                                                                                {
                                                                                                                    "ref": "PartitionResult"
                                                                                                                }
                                                                                                            ),
                                                                                                            "supportsDualStack",
                                                                                                        ),
                                                                                                    }
                                                                                                ),
                                                                                            ),
                                                                                        }
                                                                                    ),
                                                                                ),
                                                                                "rules": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "conditions": (),
                                                                                            "rules": (
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "conditions": (),
                                                                                                        "endpoint": MappingProxyType(
                                                                                                            {
                                                                                                                "url": "https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
                                                                                                                "properties": MappingProxyType(
                                                                                                                    {}
                                                                                                                ),
                                                                                                                "headers": MappingProxyType(
                                                                                                                    {}
                                                                                                                ),
                                                                                                            }
                                                                                                        ),
                                                                                                        "type": "endpoint",
                                                                                                    }
                                                                                                ),
                                                                                            ),
                                                                                            "type": "tree",
                                                                                        }
                                                                                    ),
                                                                                ),
                                                                                "type": "tree",
                                                                            }
                                                                        ),
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (),
                                                                                "error": "FIPS and DualStack are enabled, but this partition does not support one or both",
                                                                                "type": "error",
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "type": "tree",
                                                                }
                                                            ),
                                                            MappingProxyType(
                                                                {
                                                                    "conditions": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "fn": "booleanEquals",
                                                                                "argv": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "ref": "UseFIPS"
                                                                                        }
                                                                                    ),
                                                                                    True,
                                                                                ),
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "rules": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "fn": "booleanEquals",
                                                                                            "argv": (
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "fn": "getAttr",
                                                                                                        "argv": (
                                                                                                            MappingProxyType(
                                                                                                                {
                                                                                                                    "ref": "PartitionResult"
                                                                                                                }
                                                                                                            ),
                                                                                                            "supportsFIPS",
                                                                                                        ),
                                                                                                    }
                                                                                                ),
                                                                                                True,
                                                                                            ),
                                                                                        }
                                                                                    ),
                                                                                ),
                                                                                "rules": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "conditions": (),
                                                                                            "rules": (
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "conditions": (),
                                                                                                        "endpoint": MappingProxyType(
                                                                                                            {
                                                                                                                "url": "https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}",
                                                                                                                "properties": MappingProxyType(
                                                                                                                    {}
                                                                                                                ),
                                                                                                                "headers": MappingProxyType(
                                                                                                                    {}
                                                                                                                ),
                                                                                                            }
                                                                                                        ),
                                                                                                        "type": "endpoint",
                                                                                                    }
                                                                                                ),
                                                                                            ),
                                                                                            "type": "tree",
                                                                                        }
                                                                                    ),
                                                                                ),
                                                                                "type": "tree",
                                                                            }
                                                                        ),
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (),
                                                                                "error": "FIPS is enabled but this partition does not support FIPS",
                                                                                "type": "error",
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "type": "tree",
                                                                }
                                                            ),
                                                            MappingProxyType(
                                                                {
                                                                    "conditions": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "fn": "booleanEquals",
                                                                                "argv": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "ref": "UseDualStack"
                                                                                        }
                                                                                    ),
                                                                                    True,
                                                                                ),
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "rules": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "fn": "booleanEquals",
                                                                                            "argv": (
                                                                                                True,
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "fn": "getAttr",
                                                                                                        "argv": (
                                                                                                            MappingProxyType(
                                                                                                                {
                                                                                                                    "ref": "PartitionResult"
                                                                                                                }
                                                                                                            ),
                                                                                                            "supportsDualStack",
                                                                                                        ),
                                                                                                    }
                                                                                                ),
                                                                                            ),
                                                                                        }
                                                                                    ),
                                                                                ),
                                                                                "rules": (
                                                                                    MappingProxyType(
                                                                                        {
                                                                                            "conditions": (),
                                                                                            "rules": (
                                                                                                MappingProxyType(
                                                                                                    {
                                                                                                        "conditions": (),
                                                                                                        "endpoint": MappingProxyType(
                                                                                                            {
                                                                                                                "url": "https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}",
                                                                                                                "properties": MappingProxyType(
                                                                                                                    {}
                                                                                                                ),
                                                                                                                "headers": MappingProxyType(
                                                                                                                    {}
                                                                                                                ),
                                                                                                            }
                                                                                                        ),
                                                                                                        "type": "endpoint",
                                                                                                    }
                                                                                                ),
                                                                                            ),
                                                                                            "type": "tree",
                                                                                        }
                                                                                    ),
                                                                                ),
                                                                                "type": "tree",
                                                                            }
                                                                        ),
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (),
                                                                                "error": "DualStack is enabled but this partition does not support DualStack",
                                                                                "type": "error",
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "type": "tree",
                                                                }
                                                            ),
                                                            MappingProxyType(
                                                                {
                                                                    "conditions": (),
                                                                    "rules": (
                                                                        MappingProxyType(
                                                                            {
                                                                                "conditions": (),
                                                                                "endpoint": MappingProxyType(
                                                                                    {
                                                                                        "url": "https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}",
                                                                                        "properties": MappingProxyType(
                                                                                            {}
                                                                                        ),
                                                                                        "headers": MappingProxyType(
                                                                                            {}
                                                                                        ),
                                                                                    }
                                                                                ),
                                                                                "type": "endpoint",
                                                                            }
                                                                        ),
                                                                    ),
                                                                    "type": "tree",
                                                                }
                                                            ),
                                                        ),
                                                        "type": "tree",
                                                    }
                                                ),
                                            ),
                                            "type": "tree",
                                        }
                                    ),
                                    MappingProxyType(
                                        {
                                            "conditions": (),
                                            "error": "Invalid Configuration: Missing Region",
                                            "type": "error",
                                        }
                                    ),
                                ),
                                "type": "tree",
                            }
                        ),
                    ),
                }
            ),
        ),
        Trait.new(
            id=ShapeID("smithy.api#auth"),
            value=("aws.auth#sigv4", "smithy.api#httpBearerAuth"),
        ),
        Trait.new(
            id=ShapeID("aws.api#service"),
            value=MappingProxyType(
                {
                    "sdkId": "Bedrock Runtime",
                    "endpointPrefix": "bedrock-runtime",
                    "cloudTrailEventSource": "bedrock.amazonaws.com",
                }
            ),
        ),
        Trait.new(
            id=ShapeID("aws.protocols#restJson1"),
            value=MappingProxyType(
                {"http": ("h2", "http/1.1"), "eventStreamHttp": ("h2", "http/1.1")}
            ),
        ),
        Trait.new(id=ShapeID("smithy.api#httpBearerAuth")),
    ],
)
