# 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 PaymentInfoPaymentAndRefund(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Status information of the related payment. This property is only present on refund or cancel items.
    """


    class MetaOapg:
        
        class properties:
            id = schemas.UUIDSchema
            
            
            class type(
                schemas.EnumBase,
                schemas.StrSchema
            ):
                
                @schemas.classproperty
                def PAYMENT(cls):
                    return cls("payment")
                
                @schemas.classproperty
                def REFUND(cls):
                    return cls("refund")
        
            @staticmethod
            def amount() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            
            
            class description(
                schemas.EnumBase,
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "Payment": "PAYMENT",
                    }
                
                @schemas.classproperty
                def PAYMENT(cls):
                    return cls("Payment")
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'description':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
        
            @staticmethod
            def status() -> typing.Type['PaymentStatus']:
                return PaymentStatus
        
            @staticmethod
            def requiredAction() -> typing.Type['RequiredAction']:
                return RequiredAction
        
            @staticmethod
            def fees() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            createDate = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "type": type,
                "amount": amount,
                "description": description,
                "status": status,
                "requiredAction": requiredAction,
                "fees": fees,
                "createDate": createDate,
            }
    
    @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["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'PaymentStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["requiredAction"]) -> 'RequiredAction': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fees"]) -> 'FiatMoneyUsd': ...
    
    @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", "type", "amount", "description", "status", "requiredAction", "fees", "createDate", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> typing.Union['FiatMoneyUsd', 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["status"]) -> typing.Union['PaymentStatus', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["requiredAction"]) -> typing.Union['RequiredAction', 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["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", "type", "amount", "description", "status", "requiredAction", "fees", "createDate", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, schemas.Unset] = schemas.unset,
        type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset,
        amount: typing.Union['FiatMoneyUsd', schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, None, str, schemas.Unset] = schemas.unset,
        status: typing.Union['PaymentStatus', schemas.Unset] = schemas.unset,
        requiredAction: typing.Union['RequiredAction', schemas.Unset] = schemas.unset,
        fees: typing.Union['FiatMoneyUsd', 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],
    ) -> 'PaymentInfoPaymentAndRefund':
        return super().__new__(
            cls,
            *_args,
            id=id,
            type=type,
            amount=amount,
            description=description,
            status=status,
            requiredAction=requiredAction,
            fees=fees,
            createDate=createDate,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.fiat_money_usd import FiatMoneyUsd
from circle.model.payment_status import PaymentStatus
from circle.model.required_action import RequiredAction
