# coding: utf-8

"""
    elepay API リファレンス

    elepay APIはRESTをベースに構成された決済APIです。支払い処理、返金処理など、決済に関わる運用における様々なことができます。  # noqa: E501

    The version of the OpenAPI document: 1.2.0
    Contact: support@elestyle.jp
    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 elepay import schemas  # noqa: F401


class CardInfo(
    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 brand() -> typing.Type['CardBrandType']:
                return CardBrandType
            last4 = schemas.StrSchema
            expMonth = schemas.IntSchema
            expYear = schemas.IntSchema
            name = schemas.StrSchema
            wallet = schemas.StrSchema
            threeDSecure = schemas.BoolSchema
            threeDSecureVersion = schemas.StrSchema
            __annotations__ = {
                "brand": brand,
                "last4": last4,
                "expMonth": expMonth,
                "expYear": expYear,
                "name": name,
                "wallet": wallet,
                "threeDSecure": threeDSecure,
                "threeDSecureVersion": threeDSecureVersion,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["brand"]) -> 'CardBrandType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["last4"]) -> MetaOapg.properties.last4: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expMonth"]) -> MetaOapg.properties.expMonth: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expYear"]) -> MetaOapg.properties.expYear: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["wallet"]) -> MetaOapg.properties.wallet: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["threeDSecure"]) -> MetaOapg.properties.threeDSecure: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["threeDSecureVersion"]) -> MetaOapg.properties.threeDSecureVersion: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["brand", "last4", "expMonth", "expYear", "name", "wallet", "threeDSecure", "threeDSecureVersion", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["brand"]) -> typing.Union['CardBrandType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["last4"]) -> typing.Union[MetaOapg.properties.last4, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expMonth"]) -> typing.Union[MetaOapg.properties.expMonth, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expYear"]) -> typing.Union[MetaOapg.properties.expYear, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["wallet"]) -> typing.Union[MetaOapg.properties.wallet, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["threeDSecure"]) -> typing.Union[MetaOapg.properties.threeDSecure, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["threeDSecureVersion"]) -> typing.Union[MetaOapg.properties.threeDSecureVersion, 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["brand", "last4", "expMonth", "expYear", "name", "wallet", "threeDSecure", "threeDSecureVersion", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        brand: typing.Union['CardBrandType', schemas.Unset] = schemas.unset,
        last4: typing.Union[MetaOapg.properties.last4, str, schemas.Unset] = schemas.unset,
        expMonth: typing.Union[MetaOapg.properties.expMonth, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        expYear: typing.Union[MetaOapg.properties.expYear, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset,
        wallet: typing.Union[MetaOapg.properties.wallet, str, schemas.Unset] = schemas.unset,
        threeDSecure: typing.Union[MetaOapg.properties.threeDSecure, bool, schemas.Unset] = schemas.unset,
        threeDSecureVersion: typing.Union[MetaOapg.properties.threeDSecureVersion, 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],
    ) -> 'CardInfo':
        return super().__new__(
            cls,
            *args,
            brand=brand,
            last4=last4,
            expMonth=expMonth,
            expYear=expYear,
            name=name,
            wallet=wallet,
            threeDSecure=threeDSecure,
            threeDSecureVersion=threeDSecureVersion,
            _configuration=_configuration,
            **kwargs,
        )

from elepay.model.card_brand_type import CardBrandType
