# coding: utf-8

"""
    EVM API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 2.2
    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 openapi_evm_api import schemas  # noqa: F401


class TokenApproval(
    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 = {
            "spender",
            "block_number",
            "value",
            "token",
        }
        
        class properties:
            block_number = schemas.StrSchema
            value = schemas.StrSchema
            
            
            class token(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        address = schemas.StrSchema
                        
                        
                        class address_label(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'address_label':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        
                        
                        class name(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'name':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        
                        
                        class symbol(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'symbol':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        
                        
                        class logo(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'logo':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        possible_spam = schemas.BoolSchema
                        verified_contract = schemas.BoolSchema
                        
                        
                        class current_balance(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'current_balance':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        
                        
                        class current_balance_formatted(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'current_balance_formatted':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        
                        
                        class usd_price(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'usd_price':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        
                        
                        class usd_at_risk(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'usd_at_risk':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        __annotations__ = {
                            "address": address,
                            "address_label": address_label,
                            "name": name,
                            "symbol": symbol,
                            "logo": logo,
                            "possible_spam": possible_spam,
                            "verified_contract": verified_contract,
                            "current_balance": current_balance,
                            "current_balance_formatted": current_balance_formatted,
                            "usd_price": usd_price,
                            "usd_at_risk": usd_at_risk,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["address"]) -> MetaOapg.properties.address: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["address_label"]) -> MetaOapg.properties.address_label: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["symbol"]) -> MetaOapg.properties.symbol: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["logo"]) -> MetaOapg.properties.logo: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["possible_spam"]) -> MetaOapg.properties.possible_spam: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["verified_contract"]) -> MetaOapg.properties.verified_contract: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["current_balance"]) -> MetaOapg.properties.current_balance: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["current_balance_formatted"]) -> MetaOapg.properties.current_balance_formatted: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["usd_price"]) -> MetaOapg.properties.usd_price: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["usd_at_risk"]) -> MetaOapg.properties.usd_at_risk: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["address", "address_label", "name", "symbol", "logo", "possible_spam", "verified_contract", "current_balance", "current_balance_formatted", "usd_price", "usd_at_risk", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["address"]) -> typing.Union[MetaOapg.properties.address, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["address_label"]) -> typing.Union[MetaOapg.properties.address_label, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["symbol"]) -> typing.Union[MetaOapg.properties.symbol, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["logo"]) -> typing.Union[MetaOapg.properties.logo, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["possible_spam"]) -> typing.Union[MetaOapg.properties.possible_spam, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["verified_contract"]) -> typing.Union[MetaOapg.properties.verified_contract, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["current_balance"]) -> typing.Union[MetaOapg.properties.current_balance, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["current_balance_formatted"]) -> typing.Union[MetaOapg.properties.current_balance_formatted, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["usd_price"]) -> typing.Union[MetaOapg.properties.usd_price, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["usd_at_risk"]) -> typing.Union[MetaOapg.properties.usd_at_risk, 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["address", "address_label", "name", "symbol", "logo", "possible_spam", "verified_contract", "current_balance", "current_balance_formatted", "usd_price", "usd_at_risk", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    address: typing.Union[MetaOapg.properties.address, str, schemas.Unset] = schemas.unset,
                    address_label: typing.Union[MetaOapg.properties.address_label, None, str, schemas.Unset] = schemas.unset,
                    name: typing.Union[MetaOapg.properties.name, None, str, schemas.Unset] = schemas.unset,
                    symbol: typing.Union[MetaOapg.properties.symbol, None, str, schemas.Unset] = schemas.unset,
                    logo: typing.Union[MetaOapg.properties.logo, None, str, schemas.Unset] = schemas.unset,
                    possible_spam: typing.Union[MetaOapg.properties.possible_spam, bool, schemas.Unset] = schemas.unset,
                    verified_contract: typing.Union[MetaOapg.properties.verified_contract, bool, schemas.Unset] = schemas.unset,
                    current_balance: typing.Union[MetaOapg.properties.current_balance, None, str, schemas.Unset] = schemas.unset,
                    current_balance_formatted: typing.Union[MetaOapg.properties.current_balance_formatted, None, str, schemas.Unset] = schemas.unset,
                    usd_price: typing.Union[MetaOapg.properties.usd_price, None, str, schemas.Unset] = schemas.unset,
                    usd_at_risk: typing.Union[MetaOapg.properties.usd_at_risk, 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],
                ) -> 'token':
                    return super().__new__(
                        cls,
                        *args,
                        address=address,
                        address_label=address_label,
                        name=name,
                        symbol=symbol,
                        logo=logo,
                        possible_spam=possible_spam,
                        verified_contract=verified_contract,
                        current_balance=current_balance,
                        current_balance_formatted=current_balance_formatted,
                        usd_price=usd_price,
                        usd_at_risk=usd_at_risk,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class spender(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        address = schemas.StrSchema
                        
                        
                        class address_label(
                            schemas.StrBase,
                            schemas.NoneBase,
                            schemas.Schema,
                            schemas.NoneStrMixin
                        ):
                        
                        
                            def __new__(
                                cls,
                                *args: typing.Union[None, str, ],
                                _configuration: typing.Optional[schemas.Configuration] = None,
                            ) -> 'address_label':
                                return super().__new__(
                                    cls,
                                    *args,
                                    _configuration=_configuration,
                                )
                        __annotations__ = {
                            "address": address,
                            "address_label": address_label,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["address"]) -> MetaOapg.properties.address: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["address_label"]) -> MetaOapg.properties.address_label: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["address", "address_label", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["address"]) -> typing.Union[MetaOapg.properties.address, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["address_label"]) -> typing.Union[MetaOapg.properties.address_label, 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["address", "address_label", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    address: typing.Union[MetaOapg.properties.address, str, schemas.Unset] = schemas.unset,
                    address_label: typing.Union[MetaOapg.properties.address_label, 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],
                ) -> 'spender':
                    return super().__new__(
                        cls,
                        *args,
                        address=address,
                        address_label=address_label,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class block_timestamp(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'block_timestamp':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class transaction_hash(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'transaction_hash':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            
            
            class value_formatted(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'value_formatted':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            __annotations__ = {
                "block_number": block_number,
                "value": value,
                "token": token,
                "spender": spender,
                "block_timestamp": block_timestamp,
                "transaction_hash": transaction_hash,
                "value_formatted": value_formatted,
            }
    
    spender: MetaOapg.properties.spender
    block_number: MetaOapg.properties.block_number
    value: MetaOapg.properties.value
    token: MetaOapg.properties.token
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["block_number"]) -> MetaOapg.properties.block_number: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["spender"]) -> MetaOapg.properties.spender: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["block_timestamp"]) -> MetaOapg.properties.block_timestamp: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["transaction_hash"]) -> MetaOapg.properties.transaction_hash: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["value_formatted"]) -> MetaOapg.properties.value_formatted: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["block_number", "value", "token", "spender", "block_timestamp", "transaction_hash", "value_formatted", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["block_number"]) -> MetaOapg.properties.block_number: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["spender"]) -> MetaOapg.properties.spender: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["block_timestamp"]) -> typing.Union[MetaOapg.properties.block_timestamp, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["transaction_hash"]) -> typing.Union[MetaOapg.properties.transaction_hash, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["value_formatted"]) -> typing.Union[MetaOapg.properties.value_formatted, 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["block_number", "value", "token", "spender", "block_timestamp", "transaction_hash", "value_formatted", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        spender: typing.Union[MetaOapg.properties.spender, dict, frozendict.frozendict, ],
        block_number: typing.Union[MetaOapg.properties.block_number, str, ],
        value: typing.Union[MetaOapg.properties.value, str, ],
        token: typing.Union[MetaOapg.properties.token, dict, frozendict.frozendict, ],
        block_timestamp: typing.Union[MetaOapg.properties.block_timestamp, None, str, schemas.Unset] = schemas.unset,
        transaction_hash: typing.Union[MetaOapg.properties.transaction_hash, None, str, schemas.Unset] = schemas.unset,
        value_formatted: typing.Union[MetaOapg.properties.value_formatted, 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],
    ) -> 'TokenApproval':
        return super().__new__(
            cls,
            *args,
            spender=spender,
            block_number=block_number,
            value=value,
            token=token,
            block_timestamp=block_timestamp,
            transaction_hash=transaction_hash,
            value_formatted=value_formatted,
            _configuration=_configuration,
            **kwargs,
        )
