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

    Do not edit the class manually.
    """


    class MetaOapg:
        
        
        class all_of_1(
            schemas.DictSchema
        ):
        
        
            class MetaOapg:
                
                class properties:
                
                    @staticmethod
                    def configuration() -> typing.Type['ConfigurationSaml']:
                        return ConfigurationSaml
                
                    @staticmethod
                    def sso() -> typing.Type['SsoSaml']:
                        return SsoSaml
                    
                    
                    class parameters(
                        schemas.DictSchema
                    ):
                    
                    
                        class MetaOapg:
                            required = {
                                "saml_username",
                            }
                            
                            class properties:
                                
                                
                                class saml_username(
                                    schemas.DictSchema
                                ):
                                
                                
                                    class MetaOapg:
                                        required = {
                                            "user_attribute_mappings",
                                        }
                                        
                                        class properties:
                                            user_attribute_mappings = schemas.StrSchema
                                            __annotations__ = {
                                                "user_attribute_mappings": user_attribute_mappings,
                                            }
                                    
                                    user_attribute_mappings: MetaOapg.properties.user_attribute_mappings
                                    
                                    @typing.overload
                                    def __getitem__(self, name: typing_extensions.Literal["user_attribute_mappings"]) -> MetaOapg.properties.user_attribute_mappings: ...
                                    
                                    @typing.overload
                                    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                                    
                                    def __getitem__(self, name: typing.Union[typing_extensions.Literal["user_attribute_mappings", ], str]):
                                        # dict_instance[name] accessor
                                        return super().__getitem__(name)
                                    
                                    
                                    @typing.overload
                                    def get_item_oapg(self, name: typing_extensions.Literal["user_attribute_mappings"]) -> MetaOapg.properties.user_attribute_mappings: ...
                                    
                                    @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["user_attribute_mappings", ], str]):
                                        return super().get_item_oapg(name)
                                    
                                
                                    def __new__(
                                        cls,
                                        *_args: typing.Union[dict, frozendict.frozendict, ],
                                        user_attribute_mappings: typing.Union[MetaOapg.properties.user_attribute_mappings, str, ],
                                        _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],
                                    ) -> 'saml_username':
                                        return super().__new__(
                                            cls,
                                            *_args,
                                            user_attribute_mappings=user_attribute_mappings,
                                            _configuration=_configuration,
                                            **kwargs,
                                        )
                                __annotations__ = {
                                    "saml_username": saml_username,
                                }
                        
                        saml_username: MetaOapg.properties.saml_username
                        
                        @typing.overload
                        def __getitem__(self, name: typing_extensions.Literal["saml_username"]) -> MetaOapg.properties.saml_username: ...
                        
                        @typing.overload
                        def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
                        
                        def __getitem__(self, name: typing.Union[typing_extensions.Literal["saml_username", ], str]):
                            # dict_instance[name] accessor
                            return super().__getitem__(name)
                        
                        
                        @typing.overload
                        def get_item_oapg(self, name: typing_extensions.Literal["saml_username"]) -> MetaOapg.properties.saml_username: ...
                        
                        @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["saml_username", ], str]):
                            return super().get_item_oapg(name)
                        
                    
                        def __new__(
                            cls,
                            *_args: typing.Union[dict, frozendict.frozendict, ],
                            saml_username: typing.Union[MetaOapg.properties.saml_username, dict, frozendict.frozendict, ],
                            _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],
                        ) -> 'parameters':
                            return super().__new__(
                                cls,
                                *_args,
                                saml_username=saml_username,
                                _configuration=_configuration,
                                **kwargs,
                            )
                    __annotations__ = {
                        "configuration": configuration,
                        "sso": sso,
                        "parameters": parameters,
                    }
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["configuration"]) -> 'ConfigurationSaml': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["sso"]) -> 'SsoSaml': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["parameters"]) -> MetaOapg.properties.parameters: ...
            
            @typing.overload
            def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
            
            def __getitem__(self, name: typing.Union[typing_extensions.Literal["configuration", "sso", "parameters", ], str]):
                # dict_instance[name] accessor
                return super().__getitem__(name)
            
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["configuration"]) -> typing.Union['ConfigurationSaml', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["sso"]) -> typing.Union['SsoSaml', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["parameters"]) -> typing.Union[MetaOapg.properties.parameters, 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["configuration", "sso", "parameters", ], str]):
                return super().get_item_oapg(name)
            
        
            def __new__(
                cls,
                *_args: typing.Union[dict, frozendict.frozendict, ],
                configuration: typing.Union['ConfigurationSaml', schemas.Unset] = schemas.unset,
                sso: typing.Union['SsoSaml', schemas.Unset] = schemas.unset,
                parameters: typing.Union[MetaOapg.properties.parameters, dict, frozendict.frozendict, 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],
            ) -> 'all_of_1':
                return super().__new__(
                    cls,
                    *_args,
                    configuration=configuration,
                    sso=sso,
                    parameters=parameters,
                    _configuration=_configuration,
                    **kwargs,
                )
        
        @classmethod
        @functools.lru_cache()
        def all_of(cls):
            # we need this here to make our import statements work
            # we must store _composed_schemas in here so the code is only run
            # when we invoke this method. If we kept this at the class
            # level we would get an error because the class level
            # code would be run when this module is imported, and these composed
            # classes don't exist yet because their module has not finished
            # loading
            return [
                GenericApp,
                cls.all_of_1,
            ]


    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
        _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],
    ) -> 'SamlApp':
        return super().__new__(
            cls,
            *_args,
            _configuration=_configuration,
            **kwargs,
        )

from onelogin.model.configuration_saml import ConfigurationSaml
from onelogin.model.generic_app import GenericApp
from onelogin.model.sso_saml import SsoSaml
