# coding: utf-8

"""
    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 circle import schemas  # noqa: F401


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

    Do not edit the class manually.

    A transfer of funds.
    """


    class MetaOapg:
        required = {
            "amount",
            "destination",
            "id",
            "source",
            "status",
        }
        
        class properties:
            id = schemas.UUIDSchema
        
            @staticmethod
            def source() -> typing.Type['TransferSourceLocation']:
                return TransferSourceLocation
        
            @staticmethod
            def destination() -> typing.Type['TransferDestinationLocation']:
                return TransferDestinationLocation
        
            @staticmethod
            def amount() -> typing.Type['Money']:
                return Money
            
            
            class status(
                schemas.EnumBase,
                schemas.StrSchema
            ):
                
                @schemas.classproperty
                def FAILED(cls):
                    return cls("failed")
                
                @schemas.classproperty
                def PENDING(cls):
                    return cls("pending")
                
                @schemas.classproperty
                def COMPLETE(cls):
                    return cls("complete")
            
            
            class fees(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Fee']:
                        return Fee
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['Fee'], typing.List['Fee']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'fees':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Fee':
                    return super().__getitem__(i)
            transactionHash = schemas.StrSchema
        
            @staticmethod
            def errorCode() -> typing.Type['TransferErrorCode']:
                return TransferErrorCode
        
            @staticmethod
            def riskEvaluation() -> typing.Type['RiskEvaluation']:
                return RiskEvaluation
            createDate = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "source": source,
                "destination": destination,
                "amount": amount,
                "status": status,
                "fees": fees,
                "transactionHash": transactionHash,
                "errorCode": errorCode,
                "riskEvaluation": riskEvaluation,
                "createDate": createDate,
            }
    
    amount: 'Money'
    destination: 'TransferDestinationLocation'
    id: MetaOapg.properties.id
    source: 'TransferSourceLocation'
    status: MetaOapg.properties.status
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'TransferSourceLocation': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["destination"]) -> 'TransferDestinationLocation': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> 'Money': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fees"]) -> MetaOapg.properties.fees: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["transactionHash"]) -> MetaOapg.properties.transactionHash: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["errorCode"]) -> 'TransferErrorCode': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["riskEvaluation"]) -> 'RiskEvaluation': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createDate"]) -> MetaOapg.properties.createDate: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "source", "destination", "amount", "status", "fees", "transactionHash", "errorCode", "riskEvaluation", "createDate", ], 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["source"]) -> 'TransferSourceLocation': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["destination"]) -> 'TransferDestinationLocation': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> 'Money': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fees"]) -> typing.Union[MetaOapg.properties.fees, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["transactionHash"]) -> typing.Union[MetaOapg.properties.transactionHash, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["errorCode"]) -> typing.Union['TransferErrorCode', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["riskEvaluation"]) -> typing.Union['RiskEvaluation', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createDate"]) -> typing.Union[MetaOapg.properties.createDate, 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["id", "source", "destination", "amount", "status", "fees", "transactionHash", "errorCode", "riskEvaluation", "createDate", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        amount: 'Money',
        destination: 'TransferDestinationLocation',
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        source: 'TransferSourceLocation',
        status: typing.Union[MetaOapg.properties.status, str, ],
        fees: typing.Union[MetaOapg.properties.fees, list, tuple, schemas.Unset] = schemas.unset,
        transactionHash: typing.Union[MetaOapg.properties.transactionHash, str, schemas.Unset] = schemas.unset,
        errorCode: typing.Union['TransferErrorCode', schemas.Unset] = schemas.unset,
        riskEvaluation: typing.Union['RiskEvaluation', schemas.Unset] = schemas.unset,
        createDate: typing.Union[MetaOapg.properties.createDate, 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],
    ) -> 'TransferDetailedTransfer':
        return super().__new__(
            cls,
            *_args,
            amount=amount,
            destination=destination,
            id=id,
            source=source,
            status=status,
            fees=fees,
            transactionHash=transactionHash,
            errorCode=errorCode,
            riskEvaluation=riskEvaluation,
            createDate=createDate,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.fee import Fee
from circle.model.money import Money
from circle.model.risk_evaluation import RiskEvaluation
from circle.model.transfer_destination_location import TransferDestinationLocation
from circle.model.transfer_error_code import TransferErrorCode
from circle.model.transfer_source_location import TransferSourceLocation
