# 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 ExecuterTrackerRegisterInfo(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Info for creating an executer.
    """


    class MetaOapg:
        required = {
            "memory",
            "create_time",
            "cpu_count_logical",
            "cpu_count_physical",
            "git_commit_hash",
            "host_info",
            "supported_executer_types",
        }
        
        class properties:
            create_time = schemas.DateTimeSchema
            
            
            class supported_executer_types(
                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,
                ) -> 'supported_executer_types':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            cpu_count_logical = schemas.IntSchema
            cpu_count_physical = schemas.IntSchema
            memory = schemas.IntSchema
            git_commit_hash = schemas.StrSchema
            
            
            class host_info(
                schemas.ComposedSchema,
            ):
            
            
                class MetaOapg:
                    
                    @classmethod
                    @functools.lru_cache()
                    def one_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 [
                            GCloudHostInfo,
                            InductivaHostInfo,
                        ]
            
            
                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],
                ) -> 'host_info':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            machine_group_id = schemas.UUIDSchema
            mpi_cluster = schemas.BoolSchema
            num_mpi_hosts = schemas.IntSchema
            __annotations__ = {
                "create_time": create_time,
                "supported_executer_types": supported_executer_types,
                "cpu_count_logical": cpu_count_logical,
                "cpu_count_physical": cpu_count_physical,
                "memory": memory,
                "git_commit_hash": git_commit_hash,
                "host_info": host_info,
                "machine_group_id": machine_group_id,
                "mpi_cluster": mpi_cluster,
                "num_mpi_hosts": num_mpi_hosts,
            }
    
    memory: MetaOapg.properties.memory
    create_time: MetaOapg.properties.create_time
    cpu_count_logical: MetaOapg.properties.cpu_count_logical
    cpu_count_physical: MetaOapg.properties.cpu_count_physical
    git_commit_hash: MetaOapg.properties.git_commit_hash
    host_info: MetaOapg.properties.host_info
    supported_executer_types: MetaOapg.properties.supported_executer_types
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["create_time"]) -> MetaOapg.properties.create_time: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["supported_executer_types"]) -> MetaOapg.properties.supported_executer_types: ...
    
    @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["git_commit_hash"]) -> MetaOapg.properties.git_commit_hash: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["host_info"]) -> MetaOapg.properties.host_info: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["machine_group_id"]) -> MetaOapg.properties.machine_group_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["mpi_cluster"]) -> MetaOapg.properties.mpi_cluster: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["num_mpi_hosts"]) -> MetaOapg.properties.num_mpi_hosts: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["create_time", "supported_executer_types", "cpu_count_logical", "cpu_count_physical", "memory", "git_commit_hash", "host_info", "machine_group_id", "mpi_cluster", "num_mpi_hosts", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["create_time"]) -> MetaOapg.properties.create_time: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["supported_executer_types"]) -> MetaOapg.properties.supported_executer_types: ...
    
    @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["git_commit_hash"]) -> MetaOapg.properties.git_commit_hash: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["host_info"]) -> MetaOapg.properties.host_info: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["machine_group_id"]) -> typing.Union[MetaOapg.properties.machine_group_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["mpi_cluster"]) -> typing.Union[MetaOapg.properties.mpi_cluster, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["num_mpi_hosts"]) -> typing.Union[MetaOapg.properties.num_mpi_hosts, 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["create_time", "supported_executer_types", "cpu_count_logical", "cpu_count_physical", "memory", "git_commit_hash", "host_info", "machine_group_id", "mpi_cluster", "num_mpi_hosts", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        memory: typing.Union[MetaOapg.properties.memory, decimal.Decimal, int, ],
        create_time: typing.Union[MetaOapg.properties.create_time, str, datetime, ],
        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, ],
        git_commit_hash: typing.Union[MetaOapg.properties.git_commit_hash, str, ],
        host_info: typing.Union[MetaOapg.properties.host_info, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
        supported_executer_types: typing.Union[MetaOapg.properties.supported_executer_types, list, tuple, ],
        machine_group_id: typing.Union[MetaOapg.properties.machine_group_id, str, uuid.UUID, schemas.Unset] = schemas.unset,
        mpi_cluster: typing.Union[MetaOapg.properties.mpi_cluster, bool, schemas.Unset] = schemas.unset,
        num_mpi_hosts: typing.Union[MetaOapg.properties.num_mpi_hosts, decimal.Decimal, int, 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],
    ) -> 'ExecuterTrackerRegisterInfo':
        return super().__new__(
            cls,
            *_args,
            memory=memory,
            create_time=create_time,
            cpu_count_logical=cpu_count_logical,
            cpu_count_physical=cpu_count_physical,
            git_commit_hash=git_commit_hash,
            host_info=host_info,
            supported_executer_types=supported_executer_types,
            machine_group_id=machine_group_id,
            mpi_cluster=mpi_cluster,
            num_mpi_hosts=num_mpi_hosts,
            _configuration=_configuration,
            **kwargs,
        )

from inductiva.client.model.g_cloud_host_info import GCloudHostInfo
from inductiva.client.model.inductiva_host_info import InductivaHostInfo
