# coding: utf-8

"""
    OneLogin API

    OpenAPI Specification for OneLogin  # noqa: E501

    The version of the OpenAPI document: 3.1.1
    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 onelogin import schemas  # noqa: F401


class User(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """


    class MetaOapg:
        
        class properties:
            id = schemas.IntSchema
            username = schemas.StrSchema
            email = schemas.StrSchema
            firstname = schemas.StrSchema
            lastname = schemas.StrSchema
            title = schemas.StrSchema
            department = schemas.StrSchema
            company = schemas.StrSchema
            comment = schemas.StrSchema
            group_id = schemas.IntSchema
            
            
            class role_ids(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.IntSchema
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'role_ids':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            phone = schemas.StrSchema
            
            
            class state(
                schemas.EnumBase,
                schemas.IntSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        0: "POSITIVE_0",
                        1: "POSITIVE_1",
                        2: "POSITIVE_2",
                        3: "POSITIVE_3",
                    }
                
                @schemas.classproperty
                def POSITIVE_0(cls):
                    return cls(0)
                
                @schemas.classproperty
                def POSITIVE_1(cls):
                    return cls(1)
                
                @schemas.classproperty
                def POSITIVE_2(cls):
                    return cls(2)
                
                @schemas.classproperty
                def POSITIVE_3(cls):
                    return cls(3)
            
            
            class status(
                schemas.EnumBase,
                schemas.IntSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        0: "POSITIVE_0",
                        1: "POSITIVE_1",
                        2: "POSITIVE_2",
                        3: "POSITIVE_3",
                        4: "POSITIVE_4",
                        5: "POSITIVE_5",
                        7: "POSITIVE_7",
                        8: "POSITIVE_8",
                    }
                
                @schemas.classproperty
                def POSITIVE_0(cls):
                    return cls(0)
                
                @schemas.classproperty
                def POSITIVE_1(cls):
                    return cls(1)
                
                @schemas.classproperty
                def POSITIVE_2(cls):
                    return cls(2)
                
                @schemas.classproperty
                def POSITIVE_3(cls):
                    return cls(3)
                
                @schemas.classproperty
                def POSITIVE_4(cls):
                    return cls(4)
                
                @schemas.classproperty
                def POSITIVE_5(cls):
                    return cls(5)
                
                @schemas.classproperty
                def POSITIVE_7(cls):
                    return cls(7)
                
                @schemas.classproperty
                def POSITIVE_8(cls):
                    return cls(8)
            directory_id = schemas.IntSchema
            trusted_idp_id = schemas.IntSchema
            manager_ad_id = schemas.StrSchema
            manager_user_id = schemas.StrSchema
            samaccountname = schemas.StrSchema
            member_of = schemas.StrSchema
            userprincipalname = schemas.StrSchema
            distinguished_name = schemas.StrSchema
            external_id = schemas.StrSchema
            activated_at = schemas.StrSchema
            last_login = schemas.StrSchema
            invitation_sent_at = schemas.StrSchema
            updated_at = schemas.StrSchema
            preferred_locale_code = schemas.StrSchema
            created_at = schemas.StrSchema
            invalid_login_attempts = schemas.IntSchema
            locked_until = schemas.StrSchema
            password_changed_at = schemas.StrSchema
            password = schemas.StrSchema
            password_confirmation = schemas.StrSchema
            password_algorithm = schemas.StrSchema
            salt = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "username": username,
                "email": email,
                "firstname": firstname,
                "lastname": lastname,
                "title": title,
                "department": department,
                "company": company,
                "comment": comment,
                "group_id": group_id,
                "role_ids": role_ids,
                "phone": phone,
                "state": state,
                "status": status,
                "directory_id": directory_id,
                "trusted_idp_id": trusted_idp_id,
                "manager_ad_id": manager_ad_id,
                "manager_user_id": manager_user_id,
                "samaccountname": samaccountname,
                "member_of": member_of,
                "userprincipalname": userprincipalname,
                "distinguished_name": distinguished_name,
                "external_id": external_id,
                "activated_at": activated_at,
                "last_login": last_login,
                "invitation_sent_at": invitation_sent_at,
                "updated_at": updated_at,
                "preferred_locale_code": preferred_locale_code,
                "created_at": created_at,
                "invalid_login_attempts": invalid_login_attempts,
                "locked_until": locked_until,
                "password_changed_at": password_changed_at,
                "password": password,
                "password_confirmation": password_confirmation,
                "password_algorithm": password_algorithm,
                "salt": salt,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["firstname"]) -> MetaOapg.properties.firstname: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["lastname"]) -> MetaOapg.properties.lastname: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["title"]) -> MetaOapg.properties.title: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["department"]) -> MetaOapg.properties.department: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["company"]) -> MetaOapg.properties.company: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["group_id"]) -> MetaOapg.properties.group_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["role_ids"]) -> MetaOapg.properties.role_ids: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["phone"]) -> MetaOapg.properties.phone: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["state"]) -> MetaOapg.properties.state: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["directory_id"]) -> MetaOapg.properties.directory_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["trusted_idp_id"]) -> MetaOapg.properties.trusted_idp_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["manager_ad_id"]) -> MetaOapg.properties.manager_ad_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["manager_user_id"]) -> MetaOapg.properties.manager_user_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["samaccountname"]) -> MetaOapg.properties.samaccountname: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["member_of"]) -> MetaOapg.properties.member_of: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["userprincipalname"]) -> MetaOapg.properties.userprincipalname: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["distinguished_name"]) -> MetaOapg.properties.distinguished_name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["external_id"]) -> MetaOapg.properties.external_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["activated_at"]) -> MetaOapg.properties.activated_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["last_login"]) -> MetaOapg.properties.last_login: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["invitation_sent_at"]) -> MetaOapg.properties.invitation_sent_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updated_at"]) -> MetaOapg.properties.updated_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["preferred_locale_code"]) -> MetaOapg.properties.preferred_locale_code: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["invalid_login_attempts"]) -> MetaOapg.properties.invalid_login_attempts: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["locked_until"]) -> MetaOapg.properties.locked_until: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["password_changed_at"]) -> MetaOapg.properties.password_changed_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["password_confirmation"]) -> MetaOapg.properties.password_confirmation: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["password_algorithm"]) -> MetaOapg.properties.password_algorithm: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["salt"]) -> MetaOapg.properties.salt: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "username", "email", "firstname", "lastname", "title", "department", "company", "comment", "group_id", "role_ids", "phone", "state", "status", "directory_id", "trusted_idp_id", "manager_ad_id", "manager_user_id", "samaccountname", "member_of", "userprincipalname", "distinguished_name", "external_id", "activated_at", "last_login", "invitation_sent_at", "updated_at", "preferred_locale_code", "created_at", "invalid_login_attempts", "locked_until", "password_changed_at", "password", "password_confirmation", "password_algorithm", "salt", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["firstname"]) -> typing.Union[MetaOapg.properties.firstname, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["lastname"]) -> typing.Union[MetaOapg.properties.lastname, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["title"]) -> typing.Union[MetaOapg.properties.title, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["department"]) -> typing.Union[MetaOapg.properties.department, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["company"]) -> typing.Union[MetaOapg.properties.company, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["comment"]) -> typing.Union[MetaOapg.properties.comment, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["group_id"]) -> typing.Union[MetaOapg.properties.group_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["role_ids"]) -> typing.Union[MetaOapg.properties.role_ids, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["phone"]) -> typing.Union[MetaOapg.properties.phone, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["state"]) -> typing.Union[MetaOapg.properties.state, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["directory_id"]) -> typing.Union[MetaOapg.properties.directory_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["trusted_idp_id"]) -> typing.Union[MetaOapg.properties.trusted_idp_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["manager_ad_id"]) -> typing.Union[MetaOapg.properties.manager_ad_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["manager_user_id"]) -> typing.Union[MetaOapg.properties.manager_user_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["samaccountname"]) -> typing.Union[MetaOapg.properties.samaccountname, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["member_of"]) -> typing.Union[MetaOapg.properties.member_of, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["userprincipalname"]) -> typing.Union[MetaOapg.properties.userprincipalname, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["distinguished_name"]) -> typing.Union[MetaOapg.properties.distinguished_name, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["external_id"]) -> typing.Union[MetaOapg.properties.external_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["activated_at"]) -> typing.Union[MetaOapg.properties.activated_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["last_login"]) -> typing.Union[MetaOapg.properties.last_login, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["invitation_sent_at"]) -> typing.Union[MetaOapg.properties.invitation_sent_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["updated_at"]) -> typing.Union[MetaOapg.properties.updated_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["preferred_locale_code"]) -> typing.Union[MetaOapg.properties.preferred_locale_code, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> typing.Union[MetaOapg.properties.created_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["invalid_login_attempts"]) -> typing.Union[MetaOapg.properties.invalid_login_attempts, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["locked_until"]) -> typing.Union[MetaOapg.properties.locked_until, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["password_changed_at"]) -> typing.Union[MetaOapg.properties.password_changed_at, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["password_confirmation"]) -> typing.Union[MetaOapg.properties.password_confirmation, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["password_algorithm"]) -> typing.Union[MetaOapg.properties.password_algorithm, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["salt"]) -> typing.Union[MetaOapg.properties.salt, 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["id", "username", "email", "firstname", "lastname", "title", "department", "company", "comment", "group_id", "role_ids", "phone", "state", "status", "directory_id", "trusted_idp_id", "manager_ad_id", "manager_user_id", "samaccountname", "member_of", "userprincipalname", "distinguished_name", "external_id", "activated_at", "last_login", "invitation_sent_at", "updated_at", "preferred_locale_code", "created_at", "invalid_login_attempts", "locked_until", "password_changed_at", "password", "password_confirmation", "password_algorithm", "salt", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset,
        email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset,
        firstname: typing.Union[MetaOapg.properties.firstname, str, schemas.Unset] = schemas.unset,
        lastname: typing.Union[MetaOapg.properties.lastname, str, schemas.Unset] = schemas.unset,
        title: typing.Union[MetaOapg.properties.title, str, schemas.Unset] = schemas.unset,
        department: typing.Union[MetaOapg.properties.department, str, schemas.Unset] = schemas.unset,
        company: typing.Union[MetaOapg.properties.company, str, schemas.Unset] = schemas.unset,
        comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset,
        group_id: typing.Union[MetaOapg.properties.group_id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        role_ids: typing.Union[MetaOapg.properties.role_ids, list, tuple, schemas.Unset] = schemas.unset,
        phone: typing.Union[MetaOapg.properties.phone, str, schemas.Unset] = schemas.unset,
        state: typing.Union[MetaOapg.properties.state, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        status: typing.Union[MetaOapg.properties.status, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        directory_id: typing.Union[MetaOapg.properties.directory_id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        trusted_idp_id: typing.Union[MetaOapg.properties.trusted_idp_id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        manager_ad_id: typing.Union[MetaOapg.properties.manager_ad_id, str, schemas.Unset] = schemas.unset,
        manager_user_id: typing.Union[MetaOapg.properties.manager_user_id, str, schemas.Unset] = schemas.unset,
        samaccountname: typing.Union[MetaOapg.properties.samaccountname, str, schemas.Unset] = schemas.unset,
        member_of: typing.Union[MetaOapg.properties.member_of, str, schemas.Unset] = schemas.unset,
        userprincipalname: typing.Union[MetaOapg.properties.userprincipalname, str, schemas.Unset] = schemas.unset,
        distinguished_name: typing.Union[MetaOapg.properties.distinguished_name, str, schemas.Unset] = schemas.unset,
        external_id: typing.Union[MetaOapg.properties.external_id, str, schemas.Unset] = schemas.unset,
        activated_at: typing.Union[MetaOapg.properties.activated_at, str, schemas.Unset] = schemas.unset,
        last_login: typing.Union[MetaOapg.properties.last_login, str, schemas.Unset] = schemas.unset,
        invitation_sent_at: typing.Union[MetaOapg.properties.invitation_sent_at, str, schemas.Unset] = schemas.unset,
        updated_at: typing.Union[MetaOapg.properties.updated_at, str, schemas.Unset] = schemas.unset,
        preferred_locale_code: typing.Union[MetaOapg.properties.preferred_locale_code, str, schemas.Unset] = schemas.unset,
        created_at: typing.Union[MetaOapg.properties.created_at, str, schemas.Unset] = schemas.unset,
        invalid_login_attempts: typing.Union[MetaOapg.properties.invalid_login_attempts, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        locked_until: typing.Union[MetaOapg.properties.locked_until, str, schemas.Unset] = schemas.unset,
        password_changed_at: typing.Union[MetaOapg.properties.password_changed_at, str, schemas.Unset] = schemas.unset,
        password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset,
        password_confirmation: typing.Union[MetaOapg.properties.password_confirmation, str, schemas.Unset] = schemas.unset,
        password_algorithm: typing.Union[MetaOapg.properties.password_algorithm, str, schemas.Unset] = schemas.unset,
        salt: typing.Union[MetaOapg.properties.salt, str, 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],
    ) -> 'User':
        return super().__new__(
            cls,
            *_args,
            id=id,
            username=username,
            email=email,
            firstname=firstname,
            lastname=lastname,
            title=title,
            department=department,
            company=company,
            comment=comment,
            group_id=group_id,
            role_ids=role_ids,
            phone=phone,
            state=state,
            status=status,
            directory_id=directory_id,
            trusted_idp_id=trusted_idp_id,
            manager_ad_id=manager_ad_id,
            manager_user_id=manager_user_id,
            samaccountname=samaccountname,
            member_of=member_of,
            userprincipalname=userprincipalname,
            distinguished_name=distinguished_name,
            external_id=external_id,
            activated_at=activated_at,
            last_login=last_login,
            invitation_sent_at=invitation_sent_at,
            updated_at=updated_at,
            preferred_locale_code=preferred_locale_code,
            created_at=created_at,
            invalid_login_attempts=invalid_login_attempts,
            locked_until=locked_until,
            password_changed_at=password_changed_at,
            password=password,
            password_confirmation=password_confirmation,
            password_algorithm=password_algorithm,
            salt=salt,
            _configuration=_configuration,
            **kwargs,
        )
