# coding: utf-8

"""
    InductivaWebAPI

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

    The version of the OpenAPI document: 0.1.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 inductiva.client import schemas  # noqa: F401


class Executer(
    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 = {
            "vm_type",
            "memory",
            "n_mpi_hosts",
            "cpu_count_logical",
            "cpu_count_physical",
            "uuid",
            "host_type",
            "vm_name",
        }
        
        class properties:
            uuid = schemas.StrSchema
            cpu_count_logical = schemas.IntSchema
            cpu_count_physical = schemas.IntSchema
            memory = schemas.IntSchema
            n_mpi_hosts = schemas.IntSchema
            vm_type = schemas.StrSchema
            vm_name = schemas.StrSchema
            host_type = schemas.StrSchema
            
            
            class error_detail(
                schemas.ComposedSchema,
            ):
            
            
                class MetaOapg:
                    any_of_0 = schemas.StrSchema
                    any_of_1 = schemas.NoneSchema
                    
                    @classmethod
                    @functools.lru_cache()
                    def any_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            cls.any_of_0,
                            cls.any_of_1,
                        ]
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[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,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes],
                ) -> 'error_detail':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            __annotations__ = {
                "uuid": uuid,
                "cpu_count_logical": cpu_count_logical,
                "cpu_count_physical": cpu_count_physical,
                "memory": memory,
                "n_mpi_hosts": n_mpi_hosts,
                "vm_type": vm_type,
                "vm_name": vm_name,
                "host_type": host_type,
                "error_detail": error_detail,
            }
    
    vm_type: MetaOapg.properties.vm_type
    memory: MetaOapg.properties.memory
    n_mpi_hosts: MetaOapg.properties.n_mpi_hosts
    cpu_count_logical: MetaOapg.properties.cpu_count_logical
    cpu_count_physical: MetaOapg.properties.cpu_count_physical
    uuid: MetaOapg.properties.uuid
    host_type: MetaOapg.properties.host_type
    vm_name: MetaOapg.properties.vm_name
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cpu_count_logical"]) -> MetaOapg.properties.cpu_count_logical: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["cpu_count_physical"]) -> MetaOapg.properties.cpu_count_physical: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["n_mpi_hosts"]) -> MetaOapg.properties.n_mpi_hosts: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["vm_type"]) -> MetaOapg.properties.vm_type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["vm_name"]) -> MetaOapg.properties.vm_name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["host_type"]) -> MetaOapg.properties.host_type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["error_detail"]) -> MetaOapg.properties.error_detail: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["uuid", "cpu_count_logical", "cpu_count_physical", "memory", "n_mpi_hosts", "vm_type", "vm_name", "host_type", "error_detail", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cpu_count_logical"]) -> MetaOapg.properties.cpu_count_logical: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["cpu_count_physical"]) -> MetaOapg.properties.cpu_count_physical: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["memory"]) -> MetaOapg.properties.memory: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["n_mpi_hosts"]) -> MetaOapg.properties.n_mpi_hosts: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["vm_type"]) -> MetaOapg.properties.vm_type: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["vm_name"]) -> MetaOapg.properties.vm_name: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["host_type"]) -> MetaOapg.properties.host_type: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["error_detail"]) -> typing.Union[MetaOapg.properties.error_detail, 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["uuid", "cpu_count_logical", "cpu_count_physical", "memory", "n_mpi_hosts", "vm_type", "vm_name", "host_type", "error_detail", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        vm_type: typing.Union[MetaOapg.properties.vm_type, str, ],
        memory: typing.Union[MetaOapg.properties.memory, decimal.Decimal, int, ],
        n_mpi_hosts: typing.Union[MetaOapg.properties.n_mpi_hosts, decimal.Decimal, int, ],
        cpu_count_logical: typing.Union[MetaOapg.properties.cpu_count_logical, decimal.Decimal, int, ],
        cpu_count_physical: typing.Union[MetaOapg.properties.cpu_count_physical, decimal.Decimal, int, ],
        uuid: typing.Union[MetaOapg.properties.uuid, str, ],
        host_type: typing.Union[MetaOapg.properties.host_type, str, ],
        vm_name: typing.Union[MetaOapg.properties.vm_name, str, ],
        error_detail: typing.Union[MetaOapg.properties.error_detail, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, 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],
    ) -> 'Executer':
        return super().__new__(
            cls,
            *_args,
            vm_type=vm_type,
            memory=memory,
            n_mpi_hosts=n_mpi_hosts,
            cpu_count_logical=cpu_count_logical,
            cpu_count_physical=cpu_count_physical,
            uuid=uuid,
            host_type=host_type,
            vm_name=vm_name,
            error_detail=error_detail,
            _configuration=_configuration,
            **kwargs,
        )
