# 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 CheckoutSession(
    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 = {
            "paymentIds",
            "amount",
            "updateDate",
            "amountPaid",
            "clientToken",
            "expiresOn",
            "id",
            "type",
            "createDate",
            "paymentIntentIds",
            "status",
        }
        
        class properties:
            id = schemas.UUIDSchema
            
            
            class type(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "checkout_session": "CHECKOUT_SESSION",
                    }
                
                @schemas.classproperty
                def CHECKOUT_SESSION(cls):
                    return cls("checkout_session")
            clientToken = schemas.StrSchema
        
            @staticmethod
            def status() -> typing.Type['CheckoutSessionStatus']:
                return CheckoutSessionStatus
            expiresOn = schemas.StrSchema
            createDate = schemas.StrSchema
            updateDate = schemas.StrSchema
        
            @staticmethod
            def amount() -> typing.Type['CheckoutSessionMoney']:
                return CheckoutSessionMoney
        
            @staticmethod
            def amountPaid() -> typing.Type['CheckoutSessionMoney']:
                return CheckoutSessionMoney
            
            
            class paymentIds(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.UUIDSchema
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, uuid.UUID, ]], typing.List[typing.Union[MetaOapg.items, str, uuid.UUID, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'paymentIds':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            
            
            class paymentIntentIds(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.UUIDSchema
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, uuid.UUID, ]], typing.List[typing.Union[MetaOapg.items, str, uuid.UUID, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'paymentIntentIds':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
            successUrl = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "type": type,
                "clientToken": clientToken,
                "status": status,
                "expiresOn": expiresOn,
                "createDate": createDate,
                "updateDate": updateDate,
                "amount": amount,
                "amountPaid": amountPaid,
                "paymentIds": paymentIds,
                "paymentIntentIds": paymentIntentIds,
                "successUrl": successUrl,
            }
    
    paymentIds: MetaOapg.properties.paymentIds
    amount: 'CheckoutSessionMoney'
    updateDate: MetaOapg.properties.updateDate
    amountPaid: 'CheckoutSessionMoney'
    clientToken: MetaOapg.properties.clientToken
    expiresOn: MetaOapg.properties.expiresOn
    id: MetaOapg.properties.id
    type: MetaOapg.properties.type
    createDate: MetaOapg.properties.createDate
    paymentIntentIds: MetaOapg.properties.paymentIntentIds
    status: 'CheckoutSessionStatus'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["clientToken"]) -> MetaOapg.properties.clientToken: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'CheckoutSessionStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expiresOn"]) -> MetaOapg.properties.expiresOn: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createDate"]) -> MetaOapg.properties.createDate: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> 'CheckoutSessionMoney': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amountPaid"]) -> 'CheckoutSessionMoney': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["paymentIds"]) -> MetaOapg.properties.paymentIds: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["paymentIntentIds"]) -> MetaOapg.properties.paymentIntentIds: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["successUrl"]) -> MetaOapg.properties.successUrl: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "type", "clientToken", "status", "expiresOn", "createDate", "updateDate", "amount", "amountPaid", "paymentIds", "paymentIntentIds", "successUrl", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["clientToken"]) -> MetaOapg.properties.clientToken: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'CheckoutSessionStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expiresOn"]) -> MetaOapg.properties.expiresOn: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createDate"]) -> MetaOapg.properties.createDate: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["updateDate"]) -> MetaOapg.properties.updateDate: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> 'CheckoutSessionMoney': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amountPaid"]) -> 'CheckoutSessionMoney': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["paymentIds"]) -> MetaOapg.properties.paymentIds: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["paymentIntentIds"]) -> MetaOapg.properties.paymentIntentIds: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["successUrl"]) -> typing.Union[MetaOapg.properties.successUrl, 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["id", "type", "clientToken", "status", "expiresOn", "createDate", "updateDate", "amount", "amountPaid", "paymentIds", "paymentIntentIds", "successUrl", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        paymentIds: typing.Union[MetaOapg.properties.paymentIds, list, tuple, ],
        amount: 'CheckoutSessionMoney',
        updateDate: typing.Union[MetaOapg.properties.updateDate, str, ],
        amountPaid: 'CheckoutSessionMoney',
        clientToken: typing.Union[MetaOapg.properties.clientToken, str, ],
        expiresOn: typing.Union[MetaOapg.properties.expiresOn, str, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        type: typing.Union[MetaOapg.properties.type, str, ],
        createDate: typing.Union[MetaOapg.properties.createDate, str, ],
        paymentIntentIds: typing.Union[MetaOapg.properties.paymentIntentIds, list, tuple, ],
        status: 'CheckoutSessionStatus',
        successUrl: typing.Union[MetaOapg.properties.successUrl, 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],
    ) -> 'CheckoutSession':
        return super().__new__(
            cls,
            *_args,
            paymentIds=paymentIds,
            amount=amount,
            updateDate=updateDate,
            amountPaid=amountPaid,
            clientToken=clientToken,
            expiresOn=expiresOn,
            id=id,
            type=type,
            createDate=createDate,
            paymentIntentIds=paymentIntentIds,
            status=status,
            successUrl=successUrl,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.checkout_session_money import CheckoutSessionMoney
from circle.model.checkout_session_status import CheckoutSessionStatus
