# coding: utf-8

"""
    Gentrace API

    These API routes are designed to ingest events from clients.  # noqa: E501

    The version of the OpenAPI document: 0.27.0
    Generated by: https://openapi-generator.tech
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from gentrace import schemas  # noqa: F401


class RunV2(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """


    class MetaOapg:
        required = {
            "stepRuns",
            "id",
        }
        
        class properties:
            id = schemas.UUIDSchema
            
            
            class stepRuns(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    
                    class items(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            required = {
                                "outputs",
                                "invocation",
                                "cost",
                                "modelParams",
                                "inputs",
                                "stepId",
                                "startTime",
                                "endTime",
                                "providerName",
                                "stepRunId",
                                "elapsedTime",
                                "order",
                            }
                            
                            class properties:
                                stepRunId = schemas.UUIDSchema
                                stepId = schemas.UUIDSchema
                                providerName = schemas.StrSchema
                                invocation = schemas.StrSchema
                                order = schemas.IntSchema
                                modelParams = schemas.DictSchema
                                inputs = schemas.DictSchema
                                outputs = schemas.DictSchema
                                elapsedTime = schemas.IntSchema
                                startTime = schemas.Float32Schema
                                endTime = schemas.Float32Schema
                                cost = schemas.NumberSchema
                                
                                
                                class metadata(
                                    schemas.DictBase,
                                    schemas.NoneBase,
                                    schemas.Schema,
                                    schemas.NoneFrozenDictMixin
                                ):
                                
                                
                                    class MetaOapg:
                                        
                                        @staticmethod
                                        def additional_properties() -> typing.Type['MetadataValueObject']:
                                            return MetadataValueObject
                                
                                    
                                    def __getitem__(self, name: typing.Union[str, ]) -> 'MetadataValueObject':
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    def get_item_oapg(self, name: typing.Union[str, ]) -> 'MetadataValueObject':
                                        return super().get_item_oapg(name)
                                
                                    def __new__(
                                        cls,
                                        *_args: typing.Union[dict, frozendict.frozendict, None, ],
                                        _configuration: typing.Optional[schemas.Configuration] = None,
                                        **kwargs: 'MetadataValueObject',
                                    ) -> 'metadata':
                                        return super().__new__(
                                            cls,
                                            *_args,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                
                                
                                class error(
                                    schemas.StrBase,
                                    schemas.NoneBase,
                                    schemas.Schema,
                                    schemas.NoneStrMixin
                                ):
                                
                                
                                    def __new__(
                                        cls,
                                        *_args: typing.Union[None, str, ],
                                        _configuration: typing.Optional[schemas.Configuration] = None,
                                    ) -> 'error':
                                        return super().__new__(
                                            cls,
                                            *_args,
                                            _configuration=_configuration,
                                        )
                                __annotations__ = {
                                    "stepRunId": stepRunId,
                                    "stepId": stepId,
                                    "providerName": providerName,
                                    "invocation": invocation,
                                    "order": order,
                                    "modelParams": modelParams,
                                    "inputs": inputs,
                                    "outputs": outputs,
                                    "elapsedTime": elapsedTime,
                                    "startTime": startTime,
                                    "endTime": endTime,
                                    "cost": cost,
                                    "metadata": metadata,
                                    "error": error,
                                }
                        
                        outputs: MetaOapg.properties.outputs
                        invocation: MetaOapg.properties.invocation
                        cost: MetaOapg.properties.cost
                        modelParams: MetaOapg.properties.modelParams
                        inputs: MetaOapg.properties.inputs
                        stepId: MetaOapg.properties.stepId
                        startTime: MetaOapg.properties.startTime
                        endTime: MetaOapg.properties.endTime
                        providerName: MetaOapg.properties.providerName
                        stepRunId: MetaOapg.properties.stepRunId
                        elapsedTime: MetaOapg.properties.elapsedTime
                        order: MetaOapg.properties.order
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["stepRunId"]) -> MetaOapg.properties.stepRunId: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["stepId"]) -> MetaOapg.properties.stepId: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["providerName"]) -> MetaOapg.properties.providerName: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["invocation"]) -> MetaOapg.properties.invocation: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["order"]) -> MetaOapg.properties.order: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["modelParams"]) -> MetaOapg.properties.modelParams: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["inputs"]) -> MetaOapg.properties.inputs: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["outputs"]) -> MetaOapg.properties.outputs: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["elapsedTime"]) -> MetaOapg.properties.elapsedTime: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["startTime"]) -> MetaOapg.properties.startTime: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["endTime"]) -> MetaOapg.properties.endTime: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["cost"]) -> MetaOapg.properties.cost: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["error"]) -> MetaOapg.properties.error: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["stepRunId", "stepId", "providerName", "invocation", "order", "modelParams", "inputs", "outputs", "elapsedTime", "startTime", "endTime", "cost", "metadata", "error", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["stepRunId"]) -> MetaOapg.properties.stepRunId: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["stepId"]) -> MetaOapg.properties.stepId: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["providerName"]) -> MetaOapg.properties.providerName: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["invocation"]) -> MetaOapg.properties.invocation: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["order"]) -> MetaOapg.properties.order: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["modelParams"]) -> MetaOapg.properties.modelParams: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["inputs"]) -> MetaOapg.properties.inputs: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["outputs"]) -> MetaOapg.properties.outputs: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["elapsedTime"]) -> MetaOapg.properties.elapsedTime: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["startTime"]) -> MetaOapg.properties.startTime: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["endTime"]) -> MetaOapg.properties.endTime: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["cost"]) -> MetaOapg.properties.cost: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["error"]) -> typing.Union[MetaOapg.properties.error, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                        
                        def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["stepRunId", "stepId", "providerName", "invocation", "order", "modelParams", "inputs", "outputs", "elapsedTime", "startTime", "endTime", "cost", "metadata", "error", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *_args: typing.Union[dict, frozendict.frozendict, ],
                            outputs: typing.Union[MetaOapg.properties.outputs, dict, frozendict.frozendict, ],
                            invocation: typing.Union[MetaOapg.properties.invocation, str, ],
                            cost: typing.Union[MetaOapg.properties.cost, decimal.Decimal, int, float, ],
                            modelParams: typing.Union[MetaOapg.properties.modelParams, dict, frozendict.frozendict, ],
                            inputs: typing.Union[MetaOapg.properties.inputs, dict, frozendict.frozendict, ],
                            stepId: typing.Union[MetaOapg.properties.stepId, str, uuid.UUID, ],
                            startTime: typing.Union[MetaOapg.properties.startTime, decimal.Decimal, int, float, ],
                            endTime: typing.Union[MetaOapg.properties.endTime, decimal.Decimal, int, float, ],
                            providerName: typing.Union[MetaOapg.properties.providerName, str, ],
                            stepRunId: typing.Union[MetaOapg.properties.stepRunId, str, uuid.UUID, ],
                            elapsedTime: typing.Union[MetaOapg.properties.elapsedTime, decimal.Decimal, int, ],
                            order: typing.Union[MetaOapg.properties.order, decimal.Decimal, int, ],
                            metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset,
                            error: typing.Union[MetaOapg.properties.error, None, str, schemas.Unset] = schemas.unset,
                            _configuration: typing.Optional[schemas.Configuration] = None,
                            **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                        ) -> 'items':
                            return super().__new__(
                                cls,
                                *_args,
                                outputs=outputs,
                                invocation=invocation,
                                cost=cost,
                                modelParams=modelParams,
                                inputs=inputs,
                                stepId=stepId,
                                startTime=startTime,
                                endTime=endTime,
                                providerName=providerName,
                                stepRunId=stepRunId,
                                elapsedTime=elapsedTime,
                                order=order,
                                metadata=metadata,
                                error=error,
                                _configuration=_configuration,
                                **kwargs,
                            )
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'stepRuns':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            __annotations__ = {
                "id": id,
                "stepRuns": stepRuns,
            }
    
    stepRuns: MetaOapg.properties.stepRuns
    id: MetaOapg.properties.id
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["stepRuns"]) -> MetaOapg.properties.stepRuns: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "stepRuns", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["stepRuns"]) -> MetaOapg.properties.stepRuns: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "stepRuns", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        stepRuns: typing.Union[MetaOapg.properties.stepRuns, list, tuple, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
    ) -> 'RunV2':
        return super().__new__(
            cls,
            *_args,
            stepRuns=stepRuns,
            id=id,
            _configuration=_configuration,
            **kwargs,
        )

from gentrace.model.metadata_value_object import MetadataValueObject
