# coding: utf-8

"""
    Streams Api

    API that provides access to Moralis Streams  # noqa: E501

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


class WebhookTypesAptosWebhook(
    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 = {
            "retries",
            "streamId",
            "payloads",
            "changes",
            "coinTransfers",
            "block",
            "tag",
            "coinWithdrawals",
            "transactions",
            "events",
            "coinDeposits",
            "network",
        }
        
        class properties:
        
            @staticmethod
            def block() -> typing.Type['AptosBlock']:
                return AptosBlock
            
            
            class changes(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.AnyTypeSchema
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'changes':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class coinDeposits(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['AptosCoinDeposit']:
                        return AptosCoinDeposit
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['AptosCoinDeposit'], typing.List['AptosCoinDeposit']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'coinDeposits':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'AptosCoinDeposit':
                    return super().__getitem__(i)
            
            
            class coinTransfers(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['AptosCoinTransfer']:
                        return AptosCoinTransfer
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['AptosCoinTransfer'], typing.List['AptosCoinTransfer']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'coinTransfers':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'AptosCoinTransfer':
                    return super().__getitem__(i)
            
            
            class coinWithdrawals(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['AptosCoinWithdrawal']:
                        return AptosCoinWithdrawal
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['AptosCoinWithdrawal'], typing.List['AptosCoinWithdrawal']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'coinWithdrawals':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'AptosCoinWithdrawal':
                    return super().__getitem__(i)
            
            
            class events(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.AnyTypeSchema
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'events':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class network(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "mainnet": "MAINNET",
                        "testnet": "TESTNET",
                    }
                
                @schemas.classproperty
                def MAINNET(cls):
                    return cls("mainnet")
                
                @schemas.classproperty
                def TESTNET(cls):
                    return cls("testnet")
            
            
            class payloads(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.AnyTypeSchema
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'payloads':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            retries = schemas.Float64Schema
            streamId = schemas.StrSchema
            tag = schemas.StrSchema
            
            
            class transactions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['AptosTransaction']:
                        return AptosTransaction
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['AptosTransaction'], typing.List['AptosTransaction']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'transactions':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'AptosTransaction':
                    return super().__getitem__(i)
            __annotations__ = {
                "block": block,
                "changes": changes,
                "coinDeposits": coinDeposits,
                "coinTransfers": coinTransfers,
                "coinWithdrawals": coinWithdrawals,
                "events": events,
                "network": network,
                "payloads": payloads,
                "retries": retries,
                "streamId": streamId,
                "tag": tag,
                "transactions": transactions,
            }
        additional_properties = schemas.NotAnyTypeSchema
    
    retries: MetaOapg.properties.retries
    streamId: MetaOapg.properties.streamId
    payloads: MetaOapg.properties.payloads
    changes: MetaOapg.properties.changes
    coinTransfers: MetaOapg.properties.coinTransfers
    block: 'AptosBlock'
    tag: MetaOapg.properties.tag
    coinWithdrawals: MetaOapg.properties.coinWithdrawals
    transactions: MetaOapg.properties.transactions
    events: MetaOapg.properties.events
    coinDeposits: MetaOapg.properties.coinDeposits
    network: MetaOapg.properties.network
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["retries"]) -> MetaOapg.properties.retries: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["streamId"]) -> MetaOapg.properties.streamId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["payloads"]) -> MetaOapg.properties.payloads: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["changes"]) -> MetaOapg.properties.changes: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["coinTransfers"]) -> MetaOapg.properties.coinTransfers: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["block"]) -> 'AptosBlock': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["coinWithdrawals"]) -> MetaOapg.properties.coinWithdrawals: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["transactions"]) -> MetaOapg.properties.transactions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["events"]) -> MetaOapg.properties.events: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["coinDeposits"]) -> MetaOapg.properties.coinDeposits: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["network"]) -> MetaOapg.properties.network: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["retries"], typing_extensions.Literal["streamId"], typing_extensions.Literal["payloads"], typing_extensions.Literal["changes"], typing_extensions.Literal["coinTransfers"], typing_extensions.Literal["block"], typing_extensions.Literal["tag"], typing_extensions.Literal["coinWithdrawals"], typing_extensions.Literal["transactions"], typing_extensions.Literal["events"], typing_extensions.Literal["coinDeposits"], typing_extensions.Literal["network"], ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["retries"]) -> MetaOapg.properties.retries: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["streamId"]) -> MetaOapg.properties.streamId: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["payloads"]) -> MetaOapg.properties.payloads: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["changes"]) -> MetaOapg.properties.changes: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["coinTransfers"]) -> MetaOapg.properties.coinTransfers: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["block"]) -> 'AptosBlock': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["tag"]) -> MetaOapg.properties.tag: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["coinWithdrawals"]) -> MetaOapg.properties.coinWithdrawals: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["transactions"]) -> MetaOapg.properties.transactions: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> MetaOapg.properties.events: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["coinDeposits"]) -> MetaOapg.properties.coinDeposits: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["network"]) -> MetaOapg.properties.network: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["retries"], typing_extensions.Literal["streamId"], typing_extensions.Literal["payloads"], typing_extensions.Literal["changes"], typing_extensions.Literal["coinTransfers"], typing_extensions.Literal["block"], typing_extensions.Literal["tag"], typing_extensions.Literal["coinWithdrawals"], typing_extensions.Literal["transactions"], typing_extensions.Literal["events"], typing_extensions.Literal["coinDeposits"], typing_extensions.Literal["network"], ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        retries: typing.Union[MetaOapg.properties.retries, decimal.Decimal, int, float, ],
        streamId: typing.Union[MetaOapg.properties.streamId, str, ],
        payloads: typing.Union[MetaOapg.properties.payloads, list, tuple, ],
        changes: typing.Union[MetaOapg.properties.changes, list, tuple, ],
        coinTransfers: typing.Union[MetaOapg.properties.coinTransfers, list, tuple, ],
        block: 'AptosBlock',
        tag: typing.Union[MetaOapg.properties.tag, str, ],
        coinWithdrawals: typing.Union[MetaOapg.properties.coinWithdrawals, list, tuple, ],
        transactions: typing.Union[MetaOapg.properties.transactions, list, tuple, ],
        events: typing.Union[MetaOapg.properties.events, list, tuple, ],
        coinDeposits: typing.Union[MetaOapg.properties.coinDeposits, list, tuple, ],
        network: typing.Union[MetaOapg.properties.network, str, ],
        _configuration: typing.Optional[schemas.Configuration] = None,
    ) -> 'WebhookTypesAptosWebhook':
        return super().__new__(
            cls,
            *args,
            retries=retries,
            streamId=streamId,
            payloads=payloads,
            changes=changes,
            coinTransfers=coinTransfers,
            block=block,
            tag=tag,
            coinWithdrawals=coinWithdrawals,
            transactions=transactions,
            events=events,
            coinDeposits=coinDeposits,
            network=network,
            _configuration=_configuration,
        )

from openapi_streams.model.aptos_block import AptosBlock
from openapi_streams.model.aptos_coin_deposit import AptosCoinDeposit
from openapi_streams.model.aptos_coin_transfer import AptosCoinTransfer
from openapi_streams.model.aptos_coin_withdrawal import AptosCoinWithdrawal
from openapi_streams.model.aptos_transaction import AptosTransaction
