# 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 DetailedCancel(
    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 = {
            "amount",
            "merchantId",
            "id",
            "source",
            "type",
            "status",
        }
        
        class properties:
            id = schemas.UUIDSchema
            
            
            class type(
                schemas.EnumBase,
                schemas.StrSchema
            ):
                
                @schemas.classproperty
                def CANCEL(cls):
                    return cls("cancel")
            merchantId = schemas.UUIDSchema
        
            @staticmethod
            def amount() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
        
            @staticmethod
            def source() -> typing.Type['SourceResponse']:
                return SourceResponse
        
            @staticmethod
            def status() -> typing.Type['CancelRefundReversalStatus']:
                return CancelRefundReversalStatus
        
            @staticmethod
            def merchantWalletId() -> typing.Type['MerchantWalletId']:
                return MerchantWalletId
            
            
            class description(
                schemas.EnumBase,
                schemas.StrSchema
            ):
                
                @schemas.classproperty
                def PAYMENT(cls):
                    return cls("Payment")
        
            @staticmethod
            def originalPayment() -> typing.Type['FiatPayment']:
                return FiatPayment
        
            @staticmethod
            def fees() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            
            
            class trackingRef(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'trackingRef':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
        
            @staticmethod
            def errorCode() -> typing.Type['PaymentErrorCode']:
                return PaymentErrorCode
        
            @staticmethod
            def metadata() -> typing.Type['MetadataPhoneEmail']:
                return MetadataPhoneEmail
        
            @staticmethod
            def riskEvaluation() -> typing.Type['RiskEvaluation']:
                return RiskEvaluation
            refund = schemas.BoolSchema
            createDate = schemas.StrSchema
            updateDate = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "type": type,
                "merchantId": merchantId,
                "amount": amount,
                "source": source,
                "status": status,
                "merchantWalletId": merchantWalletId,
                "description": description,
                "originalPayment": originalPayment,
                "fees": fees,
                "trackingRef": trackingRef,
                "errorCode": errorCode,
                "metadata": metadata,
                "riskEvaluation": riskEvaluation,
                "refund": refund,
                "createDate": createDate,
                "updateDate": updateDate,
            }
    
    amount: 'FiatMoneyUsd'
    merchantId: MetaOapg.properties.merchantId
    id: MetaOapg.properties.id
    source: 'SourceResponse'
    type: MetaOapg.properties.type
    status: 'CancelRefundReversalStatus'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["merchantId"]) -> MetaOapg.properties.merchantId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'SourceResponse': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'CancelRefundReversalStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["merchantWalletId"]) -> 'MerchantWalletId': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["originalPayment"]) -> 'FiatPayment': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fees"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["trackingRef"]) -> MetaOapg.properties.trackingRef: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["errorCode"]) -> 'PaymentErrorCode': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'MetadataPhoneEmail': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["riskEvaluation"]) -> 'RiskEvaluation': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["refund"]) -> MetaOapg.properties.refund: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createDate"]) -> MetaOapg.properties.createDate: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "merchantId", "amount", "source", "status", "merchantWalletId", "description", "originalPayment", "fees", "trackingRef", "errorCode", "metadata", "riskEvaluation", "refund", "createDate", "updateDate", ], 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["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["merchantId"]) -> MetaOapg.properties.merchantId: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> 'SourceResponse': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'CancelRefundReversalStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["merchantWalletId"]) -> typing.Union['MerchantWalletId', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["originalPayment"]) -> typing.Union['FiatPayment', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fees"]) -> typing.Union['FiatMoneyUsd', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["trackingRef"]) -> typing.Union[MetaOapg.properties.trackingRef, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["errorCode"]) -> typing.Union['PaymentErrorCode', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union['MetadataPhoneEmail', 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["refund"]) -> typing.Union[MetaOapg.properties.refund, 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: typing_extensions.Literal["updateDate"]) -> typing.Union[MetaOapg.properties.updateDate, 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", "type", "merchantId", "amount", "source", "status", "merchantWalletId", "description", "originalPayment", "fees", "trackingRef", "errorCode", "metadata", "riskEvaluation", "refund", "createDate", "updateDate", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        amount: 'FiatMoneyUsd',
        merchantId: typing.Union[MetaOapg.properties.merchantId, str, uuid.UUID, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        source: 'SourceResponse',
        type: typing.Union[MetaOapg.properties.type, str, ],
        status: 'CancelRefundReversalStatus',
        merchantWalletId: typing.Union['MerchantWalletId', schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        originalPayment: typing.Union['FiatPayment', schemas.Unset] = schemas.unset,
        fees: typing.Union['FiatMoneyUsd', schemas.Unset] = schemas.unset,
        trackingRef: typing.Union[MetaOapg.properties.trackingRef, None, str, schemas.Unset] = schemas.unset,
        errorCode: typing.Union['PaymentErrorCode', schemas.Unset] = schemas.unset,
        metadata: typing.Union['MetadataPhoneEmail', schemas.Unset] = schemas.unset,
        riskEvaluation: typing.Union['RiskEvaluation', schemas.Unset] = schemas.unset,
        refund: typing.Union[MetaOapg.properties.refund, bool, schemas.Unset] = schemas.unset,
        createDate: typing.Union[MetaOapg.properties.createDate, str, schemas.Unset] = schemas.unset,
        updateDate: typing.Union[MetaOapg.properties.updateDate, 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],
    ) -> 'DetailedCancel':
        return super().__new__(
            cls,
            *_args,
            amount=amount,
            merchantId=merchantId,
            id=id,
            source=source,
            type=type,
            status=status,
            merchantWalletId=merchantWalletId,
            description=description,
            originalPayment=originalPayment,
            fees=fees,
            trackingRef=trackingRef,
            errorCode=errorCode,
            metadata=metadata,
            riskEvaluation=riskEvaluation,
            refund=refund,
            createDate=createDate,
            updateDate=updateDate,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.cancel_refund_reversal_status import CancelRefundReversalStatus
from circle.model.fiat_money_usd import FiatMoneyUsd
from circle.model.fiat_payment import FiatPayment
from circle.model.merchant_wallet_id import MerchantWalletId
from circle.model.metadata_phone_email import MetadataPhoneEmail
from circle.model.payment_error_code import PaymentErrorCode
from circle.model.risk_evaluation import RiskEvaluation
from circle.model.source_response import SourceResponse
