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

    Do not edit the class manually.

    For apps that connect to a OneLogin Access Enforcement Point the following enforcement_point object will be included with the app payload.
    """


    class MetaOapg:
        
        class properties:
            require_sitewide_authentication = schemas.BoolSchema
            conditions = schemas.StrSchema
        
            @staticmethod
            def session_expiry_fixed() -> typing.Type['ClockCounter']:
                return ClockCounter
        
            @staticmethod
            def session_expiry_inactivity() -> typing.Type['ClockCounter']:
                return ClockCounter
            
            
            class permissions(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "allow": "ALLOW",
                        "deny": "DENY",
                        "conditional": "CONDITIONAL",
                    }
                
                @schemas.classproperty
                def ALLOW(cls):
                    return cls("allow")
                
                @schemas.classproperty
                def DENY(cls):
                    return cls("deny")
                
                @schemas.classproperty
                def CONDITIONAL(cls):
                    return cls("conditional")
            token = schemas.StrSchema
            
            
            class target(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'target':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class resources(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    
                    class items(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            
                            class properties:
                                path = schemas.StrSchema
                                
                                
                                class is_path_regex(
                                    schemas.BoolBase,
                                    schemas.NoneBase,
                                    schemas.Schema,
                                    schemas.NoneBoolMixin
                                ):
                                
                                
                                    def __new__(
                                        cls,
                                        *_args: typing.Union[None, bool, ],
                                        _configuration: typing.Optional[schemas.Configuration] = None,
                                    ) -> 'is_path_regex':
                                        return super().__new__(
                                            cls,
                                            *_args,
                                            _configuration=_configuration,
                                        )
                                require_auth = schemas.BoolSchema
                                
                                
                                class permission(
                                    schemas.EnumBase,
                                    schemas.StrSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        enum_value_to_name = {
                                            "allow": "ALLOW",
                                            "deny": "DENY",
                                            "conditions": "CONDITIONS",
                                        }
                                    
                                    @schemas.classproperty
                                    def ALLOW(cls):
                                        return cls("allow")
                                    
                                    @schemas.classproperty
                                    def DENY(cls):
                                        return cls("deny")
                                    
                                    @schemas.classproperty
                                    def CONDITIONS(cls):
                                        return cls("conditions")
                                conditions = schemas.StrSchema
                                __annotations__ = {
                                    "path": path,
                                    "is_path_regex": is_path_regex,
                                    "require_auth": require_auth,
                                    "permission": permission,
                                    "conditions": conditions,
                                }
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["is_path_regex"]) -> MetaOapg.properties.is_path_regex: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["require_auth"]) -> MetaOapg.properties.require_auth: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ...
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["conditions"]) -> MetaOapg.properties.conditions: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["path", "is_path_regex", "require_auth", "permission", "conditions", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> typing.Union[MetaOapg.properties.path, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["is_path_regex"]) -> typing.Union[MetaOapg.properties.is_path_regex, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["require_auth"]) -> typing.Union[MetaOapg.properties.require_auth, schemas.Unset]: ...
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["permission"]) -> typing.Union[MetaOapg.properties.permission, 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ...
                        
                        def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["path", "is_path_regex", "require_auth", "permission", "conditions", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *_args: typing.Union[dict, frozendict.frozendict, ],
                            path: typing.Union[MetaOapg.properties.path, str, schemas.Unset] = schemas.unset,
                            is_path_regex: typing.Union[MetaOapg.properties.is_path_regex, None, bool, schemas.Unset] = schemas.unset,
                            require_auth: typing.Union[MetaOapg.properties.require_auth, bool, schemas.Unset] = schemas.unset,
                            permission: typing.Union[MetaOapg.properties.permission, str, schemas.Unset] = schemas.unset,
                            conditions: typing.Union[MetaOapg.properties.conditions, 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],
                        ) -> 'items':
                            return super().__new__(
                                cls,
                                *_args,
                                path=path,
                                is_path_regex=is_path_regex,
                                require_auth=require_auth,
                                permission=permission,
                                conditions=conditions,
                                _configuration=_configuration,
                                **kwargs,
                            )
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'resources':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            context_root = schemas.StrSchema
            use_target_host_header = schemas.BoolSchema
            
            
            class vhost(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'vhost':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            
            
            class landing_page(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *_args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'landing_page':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                    )
            case_sensitive = schemas.BoolSchema
            __annotations__ = {
                "require_sitewide_authentication": require_sitewide_authentication,
                "conditions": conditions,
                "session_expiry_fixed": session_expiry_fixed,
                "session_expiry_inactivity": session_expiry_inactivity,
                "permissions": permissions,
                "token": token,
                "target": target,
                "resources": resources,
                "context_root": context_root,
                "use_target_host_header": use_target_host_header,
                "vhost": vhost,
                "landing_page": landing_page,
                "case_sensitive": case_sensitive,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["require_sitewide_authentication"]) -> MetaOapg.properties.require_sitewide_authentication: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["conditions"]) -> MetaOapg.properties.conditions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["session_expiry_fixed"]) -> 'ClockCounter': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["session_expiry_inactivity"]) -> 'ClockCounter': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["permissions"]) -> MetaOapg.properties.permissions: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["token"]) -> MetaOapg.properties.token: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["target"]) -> MetaOapg.properties.target: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["resources"]) -> MetaOapg.properties.resources: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["context_root"]) -> MetaOapg.properties.context_root: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["use_target_host_header"]) -> MetaOapg.properties.use_target_host_header: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["vhost"]) -> MetaOapg.properties.vhost: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["landing_page"]) -> MetaOapg.properties.landing_page: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["case_sensitive"]) -> MetaOapg.properties.case_sensitive: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["require_sitewide_authentication", "conditions", "session_expiry_fixed", "session_expiry_inactivity", "permissions", "token", "target", "resources", "context_root", "use_target_host_header", "vhost", "landing_page", "case_sensitive", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["require_sitewide_authentication"]) -> typing.Union[MetaOapg.properties.require_sitewide_authentication, 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["session_expiry_fixed"]) -> typing.Union['ClockCounter', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["session_expiry_inactivity"]) -> typing.Union['ClockCounter', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["permissions"]) -> typing.Union[MetaOapg.properties.permissions, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["token"]) -> typing.Union[MetaOapg.properties.token, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["target"]) -> typing.Union[MetaOapg.properties.target, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["resources"]) -> typing.Union[MetaOapg.properties.resources, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["context_root"]) -> typing.Union[MetaOapg.properties.context_root, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["use_target_host_header"]) -> typing.Union[MetaOapg.properties.use_target_host_header, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["vhost"]) -> typing.Union[MetaOapg.properties.vhost, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["landing_page"]) -> typing.Union[MetaOapg.properties.landing_page, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["case_sensitive"]) -> typing.Union[MetaOapg.properties.case_sensitive, 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["require_sitewide_authentication", "conditions", "session_expiry_fixed", "session_expiry_inactivity", "permissions", "token", "target", "resources", "context_root", "use_target_host_header", "vhost", "landing_page", "case_sensitive", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        require_sitewide_authentication: typing.Union[MetaOapg.properties.require_sitewide_authentication, bool, schemas.Unset] = schemas.unset,
        conditions: typing.Union[MetaOapg.properties.conditions, str, schemas.Unset] = schemas.unset,
        session_expiry_fixed: typing.Union['ClockCounter', schemas.Unset] = schemas.unset,
        session_expiry_inactivity: typing.Union['ClockCounter', schemas.Unset] = schemas.unset,
        permissions: typing.Union[MetaOapg.properties.permissions, str, schemas.Unset] = schemas.unset,
        token: typing.Union[MetaOapg.properties.token, str, schemas.Unset] = schemas.unset,
        target: typing.Union[MetaOapg.properties.target, None, str, schemas.Unset] = schemas.unset,
        resources: typing.Union[MetaOapg.properties.resources, list, tuple, schemas.Unset] = schemas.unset,
        context_root: typing.Union[MetaOapg.properties.context_root, str, schemas.Unset] = schemas.unset,
        use_target_host_header: typing.Union[MetaOapg.properties.use_target_host_header, bool, schemas.Unset] = schemas.unset,
        vhost: typing.Union[MetaOapg.properties.vhost, None, str, schemas.Unset] = schemas.unset,
        landing_page: typing.Union[MetaOapg.properties.landing_page, None, str, schemas.Unset] = schemas.unset,
        case_sensitive: typing.Union[MetaOapg.properties.case_sensitive, 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],
    ) -> 'EnforcementPoint':
        return super().__new__(
            cls,
            *_args,
            require_sitewide_authentication=require_sitewide_authentication,
            conditions=conditions,
            session_expiry_fixed=session_expiry_fixed,
            session_expiry_inactivity=session_expiry_inactivity,
            permissions=permissions,
            token=token,
            target=target,
            resources=resources,
            context_root=context_root,
            use_target_host_header=use_target_host_header,
            vhost=vhost,
            landing_page=landing_page,
            case_sensitive=case_sensitive,
            _configuration=_configuration,
            **kwargs,
        )

from onelogin.model.clock_counter import ClockCounter
