# 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 TaskRunnerRegisterInfo(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 a task-runner.
    """

    class MetaOapg:
        required = {
            "memory",
            "create_time",
            "cpu_count_logical",
            "cpu_count_physical",
            "host_id",
            "host_name",
            "machine_group_id",
        }

        class properties:
            machine_group_id = schemas.UUIDSchema
            create_time = schemas.DateTimeSchema
            cpu_count_logical = schemas.IntSchema
            cpu_count_physical = schemas.IntSchema
            memory = schemas.IntSchema
            host_name = schemas.StrSchema
            host_id = schemas.StrSchema
            mpi_cluster = schemas.BoolSchema
            __annotations__ = {
                "machine_group_id": machine_group_id,
                "create_time": create_time,
                "cpu_count_logical": cpu_count_logical,
                "cpu_count_physical": cpu_count_physical,
                "memory": memory,
                "host_name": host_name,
                "host_id": host_id,
                "mpi_cluster": mpi_cluster,
            }

    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
    host_id: MetaOapg.properties.host_id
    host_name: MetaOapg.properties.host_name
    machine_group_id: MetaOapg.properties.machine_group_id

    @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["create_time"]
    ) -> MetaOapg.properties.create_time:
        ...

    @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["host_name"]
    ) -> MetaOapg.properties.host_name:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["host_id"]
    ) -> MetaOapg.properties.host_id:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["mpi_cluster"]
    ) -> MetaOapg.properties.mpi_cluster:
        ...

    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema:
        ...

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "machine_group_id",
        "create_time",
        "cpu_count_logical",
        "cpu_count_physical",
        "memory",
        "host_name",
        "host_id",
        "mpi_cluster",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["machine_group_id"]
    ) -> MetaOapg.properties.machine_group_id:
        ...

    @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["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["host_name"]
    ) -> MetaOapg.properties.host_name:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["host_id"]
    ) -> MetaOapg.properties.host_id:
        ...

    @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: str
    ) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]:
        ...

    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal[
        "machine_group_id",
        "create_time",
        "cpu_count_logical",
        "cpu_count_physical",
        "memory",
        "host_name",
        "host_id",
        "mpi_cluster",
    ], 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,
        ],
        host_id: typing.Union[
            MetaOapg.properties.host_id,
            str,
        ],
        host_name: typing.Union[
            MetaOapg.properties.host_name,
            str,
        ],
        machine_group_id: typing.Union[
            MetaOapg.properties.machine_group_id,
            str,
            uuid.UUID,
        ],
        mpi_cluster: typing.Union[MetaOapg.properties.mpi_cluster, bool,
                                  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],
    ) -> 'TaskRunnerRegisterInfo':
        return super().__new__(
            cls,
            *_args,
            memory=memory,
            create_time=create_time,
            cpu_count_logical=cpu_count_logical,
            cpu_count_physical=cpu_count_physical,
            host_id=host_id,
            host_name=host_name,
            machine_group_id=machine_group_id,
            mpi_cluster=mpi_cluster,
            _configuration=_configuration,
            **kwargs,
        )
