# coding: utf-8

"""
    aptos-api

    The aptos-api provider  # 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_aptos_api import schemas  # noqa: F401


class MoveModuleAbi(
    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 = {
            "address",
            "structs",
            "name",
            "exposed_functions",
            "friends",
        }
        
        class properties:
            address = schemas.StrSchema
            name = schemas.StrSchema
            
            
            class friends(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.StrSchema
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'friends':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class exposed_functions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['ModuleExposedFunction']:
                        return ModuleExposedFunction
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['ModuleExposedFunction'], typing.List['ModuleExposedFunction']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'exposed_functions':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'ModuleExposedFunction':
                    return super().__getitem__(i)
            
            
            class structs(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['ModuleStruct']:
                        return ModuleStruct
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['ModuleStruct'], typing.List['ModuleStruct']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'structs':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'ModuleStruct':
                    return super().__getitem__(i)
            __annotations__ = {
                "address": address,
                "name": name,
                "friends": friends,
                "exposed_functions": exposed_functions,
                "structs": structs,
            }
    
    address: MetaOapg.properties.address
    structs: MetaOapg.properties.structs
    name: MetaOapg.properties.name
    exposed_functions: MetaOapg.properties.exposed_functions
    friends: MetaOapg.properties.friends
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["address"]) -> MetaOapg.properties.address: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["friends"]) -> MetaOapg.properties.friends: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["exposed_functions"]) -> MetaOapg.properties.exposed_functions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["structs"]) -> MetaOapg.properties.structs: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["address", "name", "friends", "exposed_functions", "structs", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["address"]) -> MetaOapg.properties.address: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["friends"]) -> MetaOapg.properties.friends: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["exposed_functions"]) -> MetaOapg.properties.exposed_functions: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["structs"]) -> MetaOapg.properties.structs: ...
    
    @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", "name", "friends", "exposed_functions", "structs", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        address: typing.Union[MetaOapg.properties.address, str, ],
        structs: typing.Union[MetaOapg.properties.structs, list, tuple, ],
        name: typing.Union[MetaOapg.properties.name, str, ],
        exposed_functions: typing.Union[MetaOapg.properties.exposed_functions, list, tuple, ],
        friends: typing.Union[MetaOapg.properties.friends, list, tuple, ],
        _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],
    ) -> 'MoveModuleAbi':
        return super().__new__(
            cls,
            *args,
            address=address,
            structs=structs,
            name=name,
            exposed_functions=exposed_functions,
            friends=friends,
            _configuration=_configuration,
            **kwargs,
        )

from openapi_aptos_api.model.module_exposed_function import ModuleExposedFunction
from openapi_aptos_api.model.module_struct import ModuleStruct
