# 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 Hook(
    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 = {
            "retries",
            "function",
            "runtime",
            "disabled",
            "packages",
            "type",
            "timeout",
            "env_vars",
        }
        
        class properties:
            type = schemas.StrSchema
            disabled = schemas.BoolSchema
            timeout = schemas.IntSchema
            
            
            class env_vars(
                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,
                ) -> 'env_vars':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            runtime = schemas.StrSchema
            
            
            class retries(
                schemas.IntSchema
            ):
            
            
                class MetaOapg:
                    inclusive_maximum = 4
            
            
            class packages(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.StrSchema
                
                def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[MetaOapg.additional_properties, str, ],
                ) -> 'packages':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            function = schemas.StrSchema
            id = schemas.StrSchema
            context_version = schemas.StrSchema
            
            
            class status(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "ready": "READY",
                        "create-queued": "CREATEQUEUED",
                        "create-running": "CREATERUNNING",
                        "create-failed": "CREATEFAILED",
                        "update-queued": "UPDATEQUEUED",
                        "update-running": "UPDATERUNNING",
                        "update-failed": "UPDATEFAILED",
                    }
                
                @schemas.classproperty
                def READY(cls):
                    return cls("ready")
                
                @schemas.classproperty
                def CREATEQUEUED(cls):
                    return cls("create-queued")
                
                @schemas.classproperty
                def CREATERUNNING(cls):
                    return cls("create-running")
                
                @schemas.classproperty
                def CREATEFAILED(cls):
                    return cls("create-failed")
                
                @schemas.classproperty
                def UPDATEQUEUED(cls):
                    return cls("update-queued")
                
                @schemas.classproperty
                def UPDATERUNNING(cls):
                    return cls("update-running")
                
                @schemas.classproperty
                def UPDATEFAILED(cls):
                    return cls("update-failed")
            
            
            class options(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        risk_enabled = schemas.BoolSchema
                        location_enabled = schemas.BoolSchema
                        mfa_device_info_enabled = schemas.BoolSchema
                        __annotations__ = {
                            "risk_enabled": risk_enabled,
                            "location_enabled": location_enabled,
                            "mfa_device_info_enabled": mfa_device_info_enabled,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["risk_enabled"]) -> MetaOapg.properties.risk_enabled: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["location_enabled"]) -> MetaOapg.properties.location_enabled: ...
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["mfa_device_info_enabled"]) -> MetaOapg.properties.mfa_device_info_enabled: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["risk_enabled", "location_enabled", "mfa_device_info_enabled", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["risk_enabled"]) -> typing.Union[MetaOapg.properties.risk_enabled, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["location_enabled"]) -> typing.Union[MetaOapg.properties.location_enabled, schemas.Unset]: ...
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["mfa_device_info_enabled"]) -> typing.Union[MetaOapg.properties.mfa_device_info_enabled, 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["risk_enabled", "location_enabled", "mfa_device_info_enabled", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, ],
                    risk_enabled: typing.Union[MetaOapg.properties.risk_enabled, bool, schemas.Unset] = schemas.unset,
                    location_enabled: typing.Union[MetaOapg.properties.location_enabled, bool, schemas.Unset] = schemas.unset,
                    mfa_device_info_enabled: typing.Union[MetaOapg.properties.mfa_device_info_enabled, 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],
                ) -> 'options':
                    return super().__new__(
                        cls,
                        *_args,
                        risk_enabled=risk_enabled,
                        location_enabled=location_enabled,
                        mfa_device_info_enabled=mfa_device_info_enabled,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class conditions(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Condition']:
                        return Condition
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['Condition'], typing.List['Condition']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'conditions':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Condition':
                    return super().__getitem__(i)
            created_at = schemas.StrSchema
            updated_at = schemas.StrSchema
            __annotations__ = {
                "type": type,
                "disabled": disabled,
                "timeout": timeout,
                "env_vars": env_vars,
                "runtime": runtime,
                "retries": retries,
                "packages": packages,
                "function": function,
                "id": id,
                "context_version": context_version,
                "status": status,
                "options": options,
                "conditions": conditions,
                "created_at": created_at,
                "updated_at": updated_at,
            }
    
    retries: MetaOapg.properties.retries
    function: MetaOapg.properties.function
    runtime: MetaOapg.properties.runtime
    disabled: MetaOapg.properties.disabled
    packages: MetaOapg.properties.packages
    type: MetaOapg.properties.type
    timeout: MetaOapg.properties.timeout
    env_vars: MetaOapg.properties.env_vars
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["disabled"]) -> MetaOapg.properties.disabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["timeout"]) -> MetaOapg.properties.timeout: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["env_vars"]) -> MetaOapg.properties.env_vars: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["runtime"]) -> MetaOapg.properties.runtime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["retries"]) -> MetaOapg.properties.retries: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["packages"]) -> MetaOapg.properties.packages: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["function"]) -> MetaOapg.properties.function: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["context_version"]) -> MetaOapg.properties.context_version: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["options"]) -> MetaOapg.properties.options: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["conditions"]) -> MetaOapg.properties.conditions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updated_at"]) -> MetaOapg.properties.updated_at: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["type", "disabled", "timeout", "env_vars", "runtime", "retries", "packages", "function", "id", "context_version", "status", "options", "conditions", "created_at", "updated_at", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["disabled"]) -> MetaOapg.properties.disabled: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["timeout"]) -> MetaOapg.properties.timeout: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["env_vars"]) -> MetaOapg.properties.env_vars: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["runtime"]) -> MetaOapg.properties.runtime: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["retries"]) -> MetaOapg.properties.retries: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["packages"]) -> MetaOapg.properties.packages: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["function"]) -> MetaOapg.properties.function: ...
    
    @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["context_version"]) -> typing.Union[MetaOapg.properties.context_version, 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["options"]) -> typing.Union[MetaOapg.properties.options, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["conditions"]) -> typing.Union[MetaOapg.properties.conditions, 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["updated_at"]) -> typing.Union[MetaOapg.properties.updated_at, 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["type", "disabled", "timeout", "env_vars", "runtime", "retries", "packages", "function", "id", "context_version", "status", "options", "conditions", "created_at", "updated_at", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        retries: typing.Union[MetaOapg.properties.retries, decimal.Decimal, int, ],
        function: typing.Union[MetaOapg.properties.function, str, ],
        runtime: typing.Union[MetaOapg.properties.runtime, str, ],
        disabled: typing.Union[MetaOapg.properties.disabled, bool, ],
        packages: typing.Union[MetaOapg.properties.packages, dict, frozendict.frozendict, ],
        type: typing.Union[MetaOapg.properties.type, str, ],
        timeout: typing.Union[MetaOapg.properties.timeout, decimal.Decimal, int, ],
        env_vars: typing.Union[MetaOapg.properties.env_vars, list, tuple, ],
        id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
        context_version: typing.Union[MetaOapg.properties.context_version, str, schemas.Unset] = schemas.unset,
        status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset,
        options: typing.Union[MetaOapg.properties.options, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        conditions: typing.Union[MetaOapg.properties.conditions, list, tuple, schemas.Unset] = schemas.unset,
        created_at: typing.Union[MetaOapg.properties.created_at, str, schemas.Unset] = schemas.unset,
        updated_at: typing.Union[MetaOapg.properties.updated_at, 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],
    ) -> 'Hook':
        return super().__new__(
            cls,
            *_args,
            retries=retries,
            function=function,
            runtime=runtime,
            disabled=disabled,
            packages=packages,
            type=type,
            timeout=timeout,
            env_vars=env_vars,
            id=id,
            context_version=context_version,
            status=status,
            options=options,
            conditions=conditions,
            created_at=created_at,
            updated_at=updated_at,
            _configuration=_configuration,
            **kwargs,
        )

from onelogin.model.condition import Condition
