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

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        abilities: typing.Union[MetaOapg.properties.abilities, list, tuple, ],
        is_native: typing.Union[MetaOapg.properties.is_native, bool, ],
        generic_type_params: typing.Union[MetaOapg.properties.generic_type_params, list, tuple, ],
        name: typing.Union[MetaOapg.properties.name, str, ],
        fields: typing.Union[MetaOapg.properties.fields, 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],
    ) -> 'ModuleStruct':
        return super().__new__(
            cls,
            *args,
            abilities=abilities,
            is_native=is_native,
            generic_type_params=generic_type_params,
            name=name,
            fields=fields,
            _configuration=_configuration,
            **kwargs,
        )

from openapi_aptos_api.model.generic_type_param import GenericTypeParam
from openapi_aptos_api.model.module_struct_field import ModuleStructField
