# coding: utf-8

"""
    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 circle import schemas  # noqa: F401


class Timeline(
    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 = {
            "time",
            "status",
        }
        
        class properties:
            
            
            class status(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "created": "CREATED",
                        "pending": "PENDING",
                        "complete": "COMPLETE",
                        "expired": "EXPIRED",
                        "failed": "FAILED",
                        "refunded": "REFUNDED",
                    }
                
                @schemas.classproperty
                def CREATED(cls):
                    return cls("created")
                
                @schemas.classproperty
                def PENDING(cls):
                    return cls("pending")
                
                @schemas.classproperty
                def COMPLETE(cls):
                    return cls("complete")
                
                @schemas.classproperty
                def EXPIRED(cls):
                    return cls("expired")
                
                @schemas.classproperty
                def FAILED(cls):
                    return cls("failed")
                
                @schemas.classproperty
                def REFUNDED(cls):
                    return cls("refunded")
            time = schemas.DateTimeSchema
            
            
            class context(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "underpaid": "UNDERPAID",
                        "paid": "PAID",
                        "overpaid": "OVERPAID",
                    }
                
                @schemas.classproperty
                def UNDERPAID(cls):
                    return cls("underpaid")
                
                @schemas.classproperty
                def PAID(cls):
                    return cls("paid")
                
                @schemas.classproperty
                def OVERPAID(cls):
                    return cls("overpaid")
            
            
            class reason(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "requested_by_merchant": "REQUESTED_BY_MERCHANT",
                        "fee_collection_failed": "FEE_COLLECTION_FAILED",
                    }
                
                @schemas.classproperty
                def REQUESTED_BY_MERCHANT(cls):
                    return cls("requested_by_merchant")
                
                @schemas.classproperty
                def FEE_COLLECTION_FAILED(cls):
                    return cls("fee_collection_failed")
            __annotations__ = {
                "status": status,
                "time": time,
                "context": context,
                "reason": reason,
            }
    
    time: MetaOapg.properties.time
    status: MetaOapg.properties.status
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["context"]) -> MetaOapg.properties.context: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["reason"]) -> MetaOapg.properties.reason: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "time", "context", "reason", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["time"]) -> MetaOapg.properties.time: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["context"]) -> typing.Union[MetaOapg.properties.context, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["reason"]) -> typing.Union[MetaOapg.properties.reason, 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["status", "time", "context", "reason", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        time: typing.Union[MetaOapg.properties.time, str, datetime, ],
        status: typing.Union[MetaOapg.properties.status, str, ],
        context: typing.Union[MetaOapg.properties.context, str, schemas.Unset] = schemas.unset,
        reason: typing.Union[MetaOapg.properties.reason, 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],
    ) -> 'Timeline':
        return super().__new__(
            cls,
            *_args,
            time=time,
            status=status,
            context=context,
            reason=reason,
            _configuration=_configuration,
            **kwargs,
        )
