# 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 EmailData(
    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:
        
            @staticmethod
            def Preview() -> typing.Type['EmailView']:
                return EmailView
            
            
            class Attachments(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['FileInfo']:
                        return FileInfo
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['FileInfo'], typing.List['FileInfo']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'Attachments':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'FileInfo':
                    return super().__getitem__(i)
        
            @staticmethod
            def Status() -> typing.Type['EmailStatus']:
                return EmailStatus
            __annotations__ = {
                "Preview": Preview,
                "Attachments": Attachments,
                "Status": Status,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Preview"]) -> 'EmailView': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Attachments"]) -> MetaOapg.properties.Attachments: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["Status"]) -> 'EmailStatus': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["Preview", "Attachments", "Status", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Preview"]) -> typing.Union['EmailView', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Attachments"]) -> typing.Union[MetaOapg.properties.Attachments, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["Status"]) -> typing.Union['EmailStatus', 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["Preview", "Attachments", "Status", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        Preview: typing.Union['EmailView', schemas.Unset] = schemas.unset,
        Attachments: typing.Union[MetaOapg.properties.Attachments, list, tuple, schemas.Unset] = schemas.unset,
        Status: typing.Union['EmailStatus', 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],
    ) -> 'EmailData':
        return super().__new__(
            cls,
            *_args,
            Preview=Preview,
            Attachments=Attachments,
            Status=Status,
            _configuration=_configuration,
            **kwargs,
        )

from ElasticEmail.model.email_status import EmailStatus
from ElasticEmail.model.email_view import EmailView
from ElasticEmail.model.file_info import FileInfo
