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

from types import MappingProxyType

from smithy_core.prelude import BOOLEAN, FLOAT, INTEGER, STRING
from smithy_core.schemas import Schema
from smithy_core.shapes import ShapeID, ShapeType
from smithy_core.traits import Trait


VALIDATION_EXCEPTION_FIELD = Schema.collection(
    id=ShapeID("smithy.framework#ValidationExceptionField"),

    members={
        "path": {
            "target": STRING,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

        "message": {
            "target": STRING,
            "index": 1,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

    }
)

VALIDATION_EXCEPTION_FIELD_LIST = Schema.collection(
    id=ShapeID("smithy.framework#ValidationExceptionFieldList"),
    shape_type=ShapeType.LIST,
    members={
        "member": {
            "target": VALIDATION_EXCEPTION_FIELD,
            "index": 0,
        },

    }
)

VALIDATION_EXCEPTION = Schema.collection(
    id=ShapeID("smithy.framework#ValidationException"),

    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),

    ],
    members={
        "message": {
            "target": STRING,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

        "fieldList": {
            "target": VALIDATION_EXCEPTION_FIELD_LIST,
            "index": 1,
        },

    }
)

EXPERIMENT_IDENTIFIER = Schema(
    id=ShapeID("vibe.astar.public.api.shared#ExperimentIdentifier"),
    shape_type=ShapeType.STRING,
    traits=[
        Trait.new(id=ShapeID("smithy.api#pattern"), value="^[A-Za-z0-9-]+$"),

    ],

)

FLOAT_LIST = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#FloatList"),
    shape_type=ShapeType.LIST,
    members={
        "member": {
            "target": FLOAT,
            "index": 0,
        },

    }
)

FLOAT_LIST_LIST = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#FloatListList"),
    shape_type=ShapeType.LIST,
    members={
        "member": {
            "target": FLOAT_LIST,
            "index": 0,
        },

    }
)

BOOLEAN_LIST = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#BooleanList"),
    shape_type=ShapeType.LIST,
    members={
        "member": {
            "target": BOOLEAN,
            "index": 0,
        },

    }
)

INTEGER_LIST = Schema.collection(
    id=ShapeID("vibe.astar.public.api.shared#IntegerList"),
    shape_type=ShapeType.LIST,
    members={
        "member": {
            "target": INTEGER,
            "index": 0,
        },

    }
)

FORBIDDEN_EXCEPTION = Schema.collection(
    id=ShapeID("vibe.astar.public.api.shared#ForbiddenException"),

    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=403),

    ],
    members={
        "message": {
            "target": STRING,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

    }
)

UNAUTHORIZED_EXCEPTION = Schema.collection(
    id=ShapeID("vibe.astar.public.api.shared#UnauthorizedException"),

    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=401),

    ],
    members={
        "message": {
            "target": STRING,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

    }
)

VIBE_VALIDATION_EXCEPTION = Schema.collection(
    id=ShapeID("vibe.astar.public.api.shared#VibeValidationException"),

    traits=[
        Trait.new(id=ShapeID("smithy.api#error"), value="client"),
        Trait.new(id=ShapeID("smithy.api#httpError"), value=400),

    ],
    members={
        "message": {
            "target": STRING,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

    }
)

OBSERVATION_VALUE = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#ObservationValue"),
    shape_type=ShapeType.UNION,
    members={
        "discrete": {
            "target": INTEGER,
            "index": 0,
        },

        "continuous": {
            "target": FLOAT_LIST,
            "index": 1,
        },

        "multiDiscrete": {
            "target": INTEGER_LIST,
            "index": 2,
        },

        "multiBinary": {
            "target": BOOLEAN_LIST,
            "index": 3,
        },

        "box": {
            "target": FLOAT_LIST_LIST,
            "index": 4,
        },

    }
)

VALUE_MAP = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#ValueMap"),
    shape_type=ShapeType.MAP,
    members={
        "key": {
            "target": STRING,
            "index": 0,
        },

        "value": {
            "target": OBSERVATION_VALUE,
            "index": 1,
        },

    }
)

ACTION_VALUE = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#ActionValue"),
    shape_type=ShapeType.UNION,
    members={
        "discrete": {
            "target": INTEGER,
            "index": 0,
        },

        "continuous": {
            "target": FLOAT_LIST,
            "index": 1,
        },

        "multiDiscrete": {
            "target": INTEGER_LIST,
            "index": 2,
        },

        "multiBinary": {
            "target": BOOLEAN_LIST,
            "index": 3,
        },

        "box": {
            "target": FLOAT_LIST_LIST,
            "index": 4,
        },

        "dict": {
            "target": VALUE_MAP,
            "index": 5,
        },

    }
)

QUERY_AGENT_INPUT = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#QueryAgentInput"),

    traits=[
        Trait.new(id=ShapeID("smithy.api#input")),

    ],
    members={
        "experimentId": {
            "target": EXPERIMENT_IDENTIFIER,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),
                Trait.new(id=ShapeID("smithy.api#httpLabel")),

            ],
        },

        "observations": {
            "target": OBSERVATION_VALUE,
            "index": 1,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

    }
)

QUERY_AGENT_OUTPUT = Schema.collection(
    id=ShapeID("vibe.astar.public.api.operations#QueryAgentOutput"),

    traits=[
        Trait.new(id=ShapeID("smithy.api#output")),

    ],
    members={
        "actions": {
            "target": ACTION_VALUE,
            "index": 0,
            "traits": [
                Trait.new(id=ShapeID("smithy.api#required")),

            ],
        },

    }
)

QUERY_AGENT = Schema(
    id=ShapeID("vibe.astar.public.api.operations#QueryAgent"),
    shape_type=ShapeType.OPERATION,
    traits=[
        Trait.new(id=ShapeID("smithy.api#http"), value=MappingProxyType({
                "code": 200,
                "method": "POST",
                "uri": "/agents/{experimentId}/query",
            })),

    ],

)

VIBE = Schema(
    id=ShapeID("vibe.astar.public.api#Vibe"),
    shape_type=ShapeType.SERVICE,
    traits=[
        Trait.new(id=ShapeID("smithy.api#title"), value="A* tech Vibe's publicly facing API model"),
        Trait.new(id=ShapeID("smithy.api#cors"), value=MappingProxyType({
                "additionalAllowedHeaders": (
                    "Content-Type",
                    "X-Api-Key",
                    "X-Amz-User-Agent",
                    "Amz-Sdk-Invocation-Id",
                    "Amz-Sdk-Request",
                ),
                "additionalExposedHeaders": (
                    "Content-Type",
                    "X-Api-Key",
                    "X-Amz-User-Agent",
                ),
            })),
        Trait.new(id=ShapeID("aws.protocols#restJson1")),

    ],

)

OBSERVATION_VALUE.members["dict"] = Schema.member(
    id=OBSERVATION_VALUE.id.with_member("dict"),
    target=VALUE_MAP,
    index=5,
)
