# 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 UnwithdrawalObject(
    schemas.DictBase,
    schemas.NoneBase,
    schemas.Schema,
    schemas.NoneFrozenDictMixin
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Return information if the payout is returned by bank. Only present if `errorCode` of payout is `transaction_returned`.
    """


    class MetaOapg:
        
        class properties:
            id = schemas.UUIDSchema
            payoutId = schemas.UUIDSchema
        
            @staticmethod
            def amount() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
        
            @staticmethod
            def fees() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            reason = schemas.StrSchema
            
            
            class status(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "pending": "PENDING",
                        "complete": "COMPLETE",
                        "failed": "FAILED",
                    }
                
                @schemas.classproperty
                def PENDING(cls):
                    return cls("pending")
                
                @schemas.classproperty
                def COMPLETE(cls):
                    return cls("complete")
                
                @schemas.classproperty
                def FAILED(cls):
                    return cls("failed")
            createDate = schemas.StrSchema
            updateDate = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "payoutId": payoutId,
                "amount": amount,
                "fees": fees,
                "reason": reason,
                "status": status,
                "createDate": createDate,
                "updateDate": updateDate,
            }

    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["payoutId"]) -> MetaOapg.properties.payoutId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fees"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @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", "payoutId", "amount", "fees", "reason", "status", "createDate", "updateDate", ], 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["payoutId"]) -> typing.Union[MetaOapg.properties.payoutId, 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["fees"]) -> typing.Union['FiatMoneyUsd', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, 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", "payoutId", "amount", "fees", "reason", "status", "createDate", "updateDate", ], str]):
        return super().get_item_oapg(name)
    

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

from circle.model.fiat_money_usd import FiatMoneyUsd
