# 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 Card(
    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 = {
            "expMonth",
            "last4",
            "metadata",
            "updateDate",
            "billingDetails",
            "expYear",
            "fingerprint",
            "id",
            "verification",
            "createDate",
            "network",
            "status",
        }
        
        class properties:
            id = schemas.UUIDSchema
        
            @staticmethod
            def status() -> typing.Type['ExternalFiatAccountStatus']:
                return ExternalFiatAccountStatus
        
            @staticmethod
            def billingDetails() -> typing.Type['BillingDetails']:
                return BillingDetails
        
            @staticmethod
            def expMonth() -> typing.Type['CardExpMonth']:
                return CardExpMonth
        
            @staticmethod
            def expYear() -> typing.Type['CardExpYear']:
                return CardExpYear
            
            
            class network(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "VISA": "VISA",
                        "MASTERCARD": "MASTERCARD",
                        "AMEX": "AMEX",
                        "UNKNOWN": "UNKNOWN",
                    }
                
                @schemas.classproperty
                def VISA(cls):
                    return cls("VISA")
                
                @schemas.classproperty
                def MASTERCARD(cls):
                    return cls("MASTERCARD")
                
                @schemas.classproperty
                def AMEX(cls):
                    return cls("AMEX")
                
                @schemas.classproperty
                def UNKNOWN(cls):
                    return cls("UNKNOWN")
            last4 = schemas.StrSchema
            fingerprint = schemas.StrSchema
        
            @staticmethod
            def verification() -> typing.Type['CardVerificationResponse']:
                return CardVerificationResponse
        
            @staticmethod
            def metadata() -> typing.Type['MetadataPhoneEmail']:
                return MetadataPhoneEmail
            createDate = schemas.StrSchema
            updateDate = schemas.StrSchema
            bin = schemas.StrSchema
            issuerCountry = schemas.StrSchema
            
            
            class fundingType(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "credit": "CREDIT",
                        "debit": "DEBIT",
                        "prepaid": "PREPAID",
                        "unknown": "UNKNOWN",
                    }
                
                @schemas.classproperty
                def CREDIT(cls):
                    return cls("credit")
                
                @schemas.classproperty
                def DEBIT(cls):
                    return cls("debit")
                
                @schemas.classproperty
                def PREPAID(cls):
                    return cls("prepaid")
                
                @schemas.classproperty
                def UNKNOWN(cls):
                    return cls("unknown")
        
            @staticmethod
            def errorCode() -> typing.Type['VerificationErrorCode']:
                return VerificationErrorCode
        
            @staticmethod
            def riskEvaluation() -> typing.Type['RiskEvaluation']:
                return RiskEvaluation
            __annotations__ = {
                "id": id,
                "status": status,
                "billingDetails": billingDetails,
                "expMonth": expMonth,
                "expYear": expYear,
                "network": network,
                "last4": last4,
                "fingerprint": fingerprint,
                "verification": verification,
                "metadata": metadata,
                "createDate": createDate,
                "updateDate": updateDate,
                "bin": bin,
                "issuerCountry": issuerCountry,
                "fundingType": fundingType,
                "errorCode": errorCode,
                "riskEvaluation": riskEvaluation,
            }
    
    expMonth: 'CardExpMonth'
    last4: MetaOapg.properties.last4
    metadata: 'MetadataPhoneEmail'
    updateDate: MetaOapg.properties.updateDate
    billingDetails: 'BillingDetails'
    expYear: 'CardExpYear'
    fingerprint: MetaOapg.properties.fingerprint
    id: MetaOapg.properties.id
    verification: 'CardVerificationResponse'
    createDate: MetaOapg.properties.createDate
    network: MetaOapg.properties.network
    status: 'ExternalFiatAccountStatus'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ExternalFiatAccountStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["billingDetails"]) -> 'BillingDetails': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expMonth"]) -> 'CardExpMonth': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expYear"]) -> 'CardExpYear': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["network"]) -> MetaOapg.properties.network: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["last4"]) -> MetaOapg.properties.last4: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fingerprint"]) -> MetaOapg.properties.fingerprint: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["verification"]) -> 'CardVerificationResponse': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'MetadataPhoneEmail': ...
    
    @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["bin"]) -> MetaOapg.properties.bin: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["issuerCountry"]) -> MetaOapg.properties.issuerCountry: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["fundingType"]) -> MetaOapg.properties.fundingType: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["errorCode"]) -> 'VerificationErrorCode': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["riskEvaluation"]) -> 'RiskEvaluation': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "status", "billingDetails", "expMonth", "expYear", "network", "last4", "fingerprint", "verification", "metadata", "createDate", "updateDate", "bin", "issuerCountry", "fundingType", "errorCode", "riskEvaluation", ], 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["status"]) -> 'ExternalFiatAccountStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["billingDetails"]) -> 'BillingDetails': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expMonth"]) -> 'CardExpMonth': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expYear"]) -> 'CardExpYear': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["network"]) -> MetaOapg.properties.network: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["last4"]) -> MetaOapg.properties.last4: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fingerprint"]) -> MetaOapg.properties.fingerprint: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["verification"]) -> 'CardVerificationResponse': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> 'MetadataPhoneEmail': ...
    
    @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["bin"]) -> typing.Union[MetaOapg.properties.bin, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["issuerCountry"]) -> typing.Union[MetaOapg.properties.issuerCountry, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["fundingType"]) -> typing.Union[MetaOapg.properties.fundingType, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["errorCode"]) -> typing.Union['VerificationErrorCode', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["riskEvaluation"]) -> typing.Union['RiskEvaluation', 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", "status", "billingDetails", "expMonth", "expYear", "network", "last4", "fingerprint", "verification", "metadata", "createDate", "updateDate", "bin", "issuerCountry", "fundingType", "errorCode", "riskEvaluation", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        expMonth: 'CardExpMonth',
        last4: typing.Union[MetaOapg.properties.last4, str, ],
        metadata: 'MetadataPhoneEmail',
        updateDate: typing.Union[MetaOapg.properties.updateDate, str, ],
        billingDetails: 'BillingDetails',
        expYear: 'CardExpYear',
        fingerprint: typing.Union[MetaOapg.properties.fingerprint, str, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        verification: 'CardVerificationResponse',
        createDate: typing.Union[MetaOapg.properties.createDate, str, ],
        network: typing.Union[MetaOapg.properties.network, str, ],
        status: 'ExternalFiatAccountStatus',
        bin: typing.Union[MetaOapg.properties.bin, str, schemas.Unset] = schemas.unset,
        issuerCountry: typing.Union[MetaOapg.properties.issuerCountry, str, schemas.Unset] = schemas.unset,
        fundingType: typing.Union[MetaOapg.properties.fundingType, str, schemas.Unset] = schemas.unset,
        errorCode: typing.Union['VerificationErrorCode', schemas.Unset] = schemas.unset,
        riskEvaluation: typing.Union['RiskEvaluation', 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],
    ) -> 'Card':
        return super().__new__(
            cls,
            *_args,
            expMonth=expMonth,
            last4=last4,
            metadata=metadata,
            updateDate=updateDate,
            billingDetails=billingDetails,
            expYear=expYear,
            fingerprint=fingerprint,
            id=id,
            verification=verification,
            createDate=createDate,
            network=network,
            status=status,
            bin=bin,
            issuerCountry=issuerCountry,
            fundingType=fundingType,
            errorCode=errorCode,
            riskEvaluation=riskEvaluation,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.billing_details import BillingDetails
from circle.model.card_exp_month import CardExpMonth
from circle.model.card_exp_year import CardExpYear
from circle.model.card_verification_response import CardVerificationResponse
from circle.model.external_fiat_account_status import ExternalFiatAccountStatus
from circle.model.metadata_phone_email import MetadataPhoneEmail
from circle.model.risk_evaluation import RiskEvaluation
from circle.model.verification_error_code import VerificationErrorCode
