# 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 GenericApp(
    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
            name = schemas.StrSchema
            visible = schemas.BoolSchema
            description = schemas.StrSchema
            notes = schemas.StrSchema
            icon_url = schemas.StrSchema
        
            @staticmethod
            def auth_method() -> typing.Type['AuthMethod']:
                return AuthMethod
            policy_id = schemas.IntSchema
            allow_assumed_signin = schemas.BoolSchema
            tab_id = schemas.IntSchema
            connector_id = schemas.IntSchema
            created_at = schemas.StrSchema
            updated_at = schemas.StrSchema
            
            
            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)
            
            
            class provisioning(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    
                    class properties:
                        enabled = schemas.BoolSchema
                        __annotations__ = {
                            "enabled": enabled,
                        }
                
                @typing.overload
                def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ...
                
                @typing.overload
                def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                
                def __getitem__(self, name: typing.Union[typing_extensions.Literal["enabled", ], str]):
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                
                @typing.overload
                def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.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["enabled", ], str]):
                    return super().get_item_oapg(name)
                
            
                def __new__(
                    cls,
                    *_args: typing.Union[dict, frozendict.frozendict, ],
                    enabled: typing.Union[MetaOapg.properties.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],
                ) -> 'provisioning':
                    return super().__new__(
                        cls,
                        *_args,
                        enabled=enabled,
                        _configuration=_configuration,
                        **kwargs,
                    )
        
            @staticmethod
            def parameters() -> typing.Type['AppParameters']:
                return AppParameters
        
            @staticmethod
            def enforcement_point() -> typing.Type['EnforcementPoint']:
                return EnforcementPoint
            __annotations__ = {
                "id": id,
                "name": name,
                "visible": visible,
                "description": description,
                "notes": notes,
                "icon_url": icon_url,
                "auth_method": auth_method,
                "policy_id": policy_id,
                "allow_assumed_signin": allow_assumed_signin,
                "tab_id": tab_id,
                "connector_id": connector_id,
                "created_at": created_at,
                "updated_at": updated_at,
                "role_ids": role_ids,
                "provisioning": provisioning,
                "parameters": parameters,
                "enforcement_point": enforcement_point,
            }
        additional_properties = schemas.AnyTypeSchema
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["visible"]) -> MetaOapg.properties.visible: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["notes"]) -> MetaOapg.properties.notes: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["icon_url"]) -> MetaOapg.properties.icon_url: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["auth_method"]) -> 'AuthMethod': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["policy_id"]) -> MetaOapg.properties.policy_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["allow_assumed_signin"]) -> MetaOapg.properties.allow_assumed_signin: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["tab_id"]) -> MetaOapg.properties.tab_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["connector_id"]) -> MetaOapg.properties.connector_id: ...
    
    @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: typing_extensions.Literal["role_ids"]) -> MetaOapg.properties.role_ids: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["provisioning"]) -> MetaOapg.properties.provisioning: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["parameters"]) -> 'AppParameters': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["enforcement_point"]) -> 'EnforcementPoint': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id"], typing_extensions.Literal["name"], typing_extensions.Literal["visible"], typing_extensions.Literal["description"], typing_extensions.Literal["notes"], typing_extensions.Literal["icon_url"], typing_extensions.Literal["auth_method"], typing_extensions.Literal["policy_id"], typing_extensions.Literal["allow_assumed_signin"], typing_extensions.Literal["tab_id"], typing_extensions.Literal["connector_id"], typing_extensions.Literal["created_at"], typing_extensions.Literal["updated_at"], typing_extensions.Literal["role_ids"], typing_extensions.Literal["provisioning"], typing_extensions.Literal["parameters"], typing_extensions.Literal["enforcement_point"], 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["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["visible"]) -> typing.Union[MetaOapg.properties.visible, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["notes"]) -> typing.Union[MetaOapg.properties.notes, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["icon_url"]) -> typing.Union[MetaOapg.properties.icon_url, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["auth_method"]) -> typing.Union['AuthMethod', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["policy_id"]) -> typing.Union[MetaOapg.properties.policy_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["allow_assumed_signin"]) -> typing.Union[MetaOapg.properties.allow_assumed_signin, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["tab_id"]) -> typing.Union[MetaOapg.properties.tab_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["connector_id"]) -> typing.Union[MetaOapg.properties.connector_id, 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: typing_extensions.Literal["role_ids"]) -> typing.Union[MetaOapg.properties.role_ids, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["provisioning"]) -> typing.Union[MetaOapg.properties.provisioning, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["parameters"]) -> typing.Union['AppParameters', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["enforcement_point"]) -> typing.Union['EnforcementPoint', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id"], typing_extensions.Literal["name"], typing_extensions.Literal["visible"], typing_extensions.Literal["description"], typing_extensions.Literal["notes"], typing_extensions.Literal["icon_url"], typing_extensions.Literal["auth_method"], typing_extensions.Literal["policy_id"], typing_extensions.Literal["allow_assumed_signin"], typing_extensions.Literal["tab_id"], typing_extensions.Literal["connector_id"], typing_extensions.Literal["created_at"], typing_extensions.Literal["updated_at"], typing_extensions.Literal["role_ids"], typing_extensions.Literal["provisioning"], typing_extensions.Literal["parameters"], typing_extensions.Literal["enforcement_point"], 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,
        name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
        visible: typing.Union[MetaOapg.properties.visible, bool, schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        notes: typing.Union[MetaOapg.properties.notes, str, schemas.Unset] = schemas.unset,
        icon_url: typing.Union[MetaOapg.properties.icon_url, str, schemas.Unset] = schemas.unset,
        auth_method: typing.Union['AuthMethod', schemas.Unset] = schemas.unset,
        policy_id: typing.Union[MetaOapg.properties.policy_id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        allow_assumed_signin: typing.Union[MetaOapg.properties.allow_assumed_signin, bool, schemas.Unset] = schemas.unset,
        tab_id: typing.Union[MetaOapg.properties.tab_id, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        connector_id: typing.Union[MetaOapg.properties.connector_id, decimal.Decimal, int, 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,
        role_ids: typing.Union[MetaOapg.properties.role_ids, list, tuple, schemas.Unset] = schemas.unset,
        provisioning: typing.Union[MetaOapg.properties.provisioning, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        parameters: typing.Union['AppParameters', schemas.Unset] = schemas.unset,
        enforcement_point: typing.Union['EnforcementPoint', schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
    ) -> 'GenericApp':
        return super().__new__(
            cls,
            *_args,
            id=id,
            name=name,
            visible=visible,
            description=description,
            notes=notes,
            icon_url=icon_url,
            auth_method=auth_method,
            policy_id=policy_id,
            allow_assumed_signin=allow_assumed_signin,
            tab_id=tab_id,
            connector_id=connector_id,
            created_at=created_at,
            updated_at=updated_at,
            role_ids=role_ids,
            provisioning=provisioning,
            parameters=parameters,
            enforcement_point=enforcement_point,
            _configuration=_configuration,
            **kwargs,
        )

from onelogin.model.app_parameters import AppParameters
from onelogin.model.auth_method import AuthMethod
from onelogin.model.enforcement_point import EnforcementPoint
