# 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 OrganizationUsers(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 = {
            "identity_provider_id",
            "name",
            "creation_ts",
            "id",
            "total_users",
            "users",
            "status",
        }

        class properties:
            id = schemas.StrSchema
            identity_provider_id = schemas.StrSchema
            name = schemas.StrSchema

            @staticmethod
            def status() -> typing.Type['OrgStatus']:
                return OrgStatus

            creation_ts = schemas.DateTimeSchema
            total_users = schemas.IntSchema

            class users(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,
                ) -> 'users':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )

                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)

            __annotations__ = {
                "id": id,
                "identity_provider_id": identity_provider_id,
                "name": name,
                "status": status,
                "creation_ts": creation_ts,
                "total_users": total_users,
                "users": users,
            }

    identity_provider_id: MetaOapg.properties.identity_provider_id
    name: MetaOapg.properties.name
    creation_ts: MetaOapg.properties.creation_ts
    id: MetaOapg.properties.id
    total_users: MetaOapg.properties.total_users
    users: MetaOapg.properties.users
    status: 'OrgStatus'

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

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

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

    @typing.overload
    def __getitem__(self,
                    name: typing_extensions.Literal["status"]) -> 'OrgStatus':
        ...

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

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

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

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

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "id",
        "identity_provider_id",
        "name",
        "status",
        "creation_ts",
        "total_users",
        "users",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

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

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

    @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["status"]) -> 'OrgStatus':
        ...

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

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

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

    @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[
        "id",
        "identity_provider_id",
        "name",
        "status",
        "creation_ts",
        "total_users",
        "users",
    ], str]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *_args: typing.Union[
            dict,
            frozendict.frozendict,
        ],
        identity_provider_id: typing.Union[
            MetaOapg.properties.identity_provider_id,
            str,
        ],
        name: typing.Union[
            MetaOapg.properties.name,
            str,
        ],
        creation_ts: typing.Union[
            MetaOapg.properties.creation_ts,
            str,
            datetime,
        ],
        id: typing.Union[
            MetaOapg.properties.id,
            str,
        ],
        total_users: typing.Union[
            MetaOapg.properties.total_users,
            decimal.Decimal,
            int,
        ],
        users: typing.Union[
            MetaOapg.properties.users,
            list,
            tuple,
        ],
        status: 'OrgStatus',
        _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],
    ) -> 'OrganizationUsers':
        return super().__new__(
            cls,
            *_args,
            identity_provider_id=identity_provider_id,
            name=name,
            creation_ts=creation_ts,
            id=id,
            total_users=total_users,
            users=users,
            status=status,
            _configuration=_configuration,
            **kwargs,
        )


from inductiva.client.model.org_status import OrgStatus
