# coding: utf-8

"""
    Elastic Email REST API

    This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.    Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used.    The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request.    To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description.    Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>  # noqa: E501

    The version of the OpenAPI document: 4.0.0
    Contact: support@elasticemail.com
    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 ElasticEmail import schemas  # noqa: F401


class InboundPayload(
    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 = {
            "FilterType",
            "ActionType",
            "Filter",
            "Name",
        }
        
        class properties:
            Filter = schemas.StrSchema
            Name = schemas.StrSchema
        
            @staticmethod
            def FilterType() -> typing.Type['InboundRouteFilterType']:
                return InboundRouteFilterType
        
            @staticmethod
            def ActionType() -> typing.Type['InboundRouteActionType']:
                return InboundRouteActionType
            EmailAddress = schemas.StrSchema
            HttpAddress = schemas.StrSchema
            __annotations__ = {
                "Filter": Filter,
                "Name": Name,
                "FilterType": FilterType,
                "ActionType": ActionType,
                "EmailAddress": EmailAddress,
                "HttpAddress": HttpAddress,
            }
    
    FilterType: 'InboundRouteFilterType'
    ActionType: 'InboundRouteActionType'
    Filter: MetaOapg.properties.Filter
    Name: MetaOapg.properties.Name
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Filter"]) -> MetaOapg.properties.Filter: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Name"]) -> MetaOapg.properties.Name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["FilterType"]) -> 'InboundRouteFilterType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["ActionType"]) -> 'InboundRouteActionType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["EmailAddress"]) -> MetaOapg.properties.EmailAddress: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["HttpAddress"]) -> MetaOapg.properties.HttpAddress: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["Filter", "Name", "FilterType", "ActionType", "EmailAddress", "HttpAddress", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Filter"]) -> MetaOapg.properties.Filter: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Name"]) -> MetaOapg.properties.Name: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["FilterType"]) -> 'InboundRouteFilterType': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["ActionType"]) -> 'InboundRouteActionType': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["EmailAddress"]) -> typing.Union[MetaOapg.properties.EmailAddress, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["HttpAddress"]) -> typing.Union[MetaOapg.properties.HttpAddress, 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["Filter", "Name", "FilterType", "ActionType", "EmailAddress", "HttpAddress", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        FilterType: 'InboundRouteFilterType',
        ActionType: 'InboundRouteActionType',
        Filter: typing.Union[MetaOapg.properties.Filter, str, ],
        Name: typing.Union[MetaOapg.properties.Name, str, ],
        EmailAddress: typing.Union[MetaOapg.properties.EmailAddress, str, schemas.Unset] = schemas.unset,
        HttpAddress: typing.Union[MetaOapg.properties.HttpAddress, 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],
    ) -> 'InboundPayload':
        return super().__new__(
            cls,
            *_args,
            FilterType=FilterType,
            ActionType=ActionType,
            Filter=Filter,
            Name=Name,
            EmailAddress=EmailAddress,
            HttpAddress=HttpAddress,
            _configuration=_configuration,
            **kwargs,
        )

from ElasticEmail.model.inbound_route_action_type import InboundRouteActionType
from ElasticEmail.model.inbound_route_filter_type import InboundRouteFilterType
