# 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 PaymentCreationRequest(
    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 = {
            "amount",
            "metadata",
            "idempotencyKey",
            "source",
            "verification",
        }
        
        class properties:
            idempotencyKey = schemas.UUIDSchema
        
            @staticmethod
            def metadata() -> typing.Type['MetadataPayment']:
                return MetadataPayment
        
            @staticmethod
            def amount() -> typing.Type['FiatMoneyUsd']:
                return FiatMoneyUsd
            
            
            class verification(
                schemas.EnumBase,
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    enum_value_to_name = {
                        "none": "NONE",
                        "cvv": "CVV",
                        "three_d_secure": "THREE_D_SECURE",
                    }
                
                @schemas.classproperty
                def NONE(cls):
                    return cls("none")
                
                @schemas.classproperty
                def CVV(cls):
                    return cls("cvv")
                
                @schemas.classproperty
                def THREE_D_SECURE(cls):
                    return cls("three_d_secure")
        
            @staticmethod
            def source() -> typing.Type['Source']:
                return Source
            keyId = schemas.UUIDSchema
            autoCapture = schemas.BoolSchema
            verificationSuccessUrl = schemas.StrSchema
            verificationFailureUrl = schemas.StrSchema
            description = schemas.StrSchema
            encryptedData = schemas.StrSchema
            channel = schemas.UUIDSchema
            __annotations__ = {
                "idempotencyKey": idempotencyKey,
                "metadata": metadata,
                "amount": amount,
                "verification": verification,
                "source": source,
                "keyId": keyId,
                "autoCapture": autoCapture,
                "verificationSuccessUrl": verificationSuccessUrl,
                "verificationFailureUrl": verificationFailureUrl,
                "description": description,
                "encryptedData": encryptedData,
                "channel": channel,
            }
    
    amount: 'FiatMoneyUsd'
    metadata: 'MetadataPayment'
    idempotencyKey: MetaOapg.properties.idempotencyKey
    source: 'Source'
    verification: MetaOapg.properties.verification
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["idempotencyKey"]) -> MetaOapg.properties.idempotencyKey: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> 'MetadataPayment': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["verification"]) -> MetaOapg.properties.verification: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["source"]) -> 'Source': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["keyId"]) -> MetaOapg.properties.keyId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["autoCapture"]) -> MetaOapg.properties.autoCapture: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["verificationSuccessUrl"]) -> MetaOapg.properties.verificationSuccessUrl: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["verificationFailureUrl"]) -> MetaOapg.properties.verificationFailureUrl: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["encryptedData"]) -> MetaOapg.properties.encryptedData: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["channel"]) -> MetaOapg.properties.channel: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["idempotencyKey", "metadata", "amount", "verification", "source", "keyId", "autoCapture", "verificationSuccessUrl", "verificationFailureUrl", "description", "encryptedData", "channel", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["idempotencyKey"]) -> MetaOapg.properties.idempotencyKey: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> 'MetadataPayment': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> 'FiatMoneyUsd': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["verification"]) -> MetaOapg.properties.verification: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["source"]) -> 'Source': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["keyId"]) -> typing.Union[MetaOapg.properties.keyId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["autoCapture"]) -> typing.Union[MetaOapg.properties.autoCapture, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["verificationSuccessUrl"]) -> typing.Union[MetaOapg.properties.verificationSuccessUrl, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["verificationFailureUrl"]) -> typing.Union[MetaOapg.properties.verificationFailureUrl, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["encryptedData"]) -> typing.Union[MetaOapg.properties.encryptedData, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["channel"]) -> typing.Union[MetaOapg.properties.channel, 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["idempotencyKey", "metadata", "amount", "verification", "source", "keyId", "autoCapture", "verificationSuccessUrl", "verificationFailureUrl", "description", "encryptedData", "channel", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        amount: 'FiatMoneyUsd',
        metadata: 'MetadataPayment',
        idempotencyKey: typing.Union[MetaOapg.properties.idempotencyKey, str, uuid.UUID, ],
        source: 'Source',
        verification: typing.Union[MetaOapg.properties.verification, str, ],
        keyId: typing.Union[MetaOapg.properties.keyId, str, uuid.UUID, schemas.Unset] = schemas.unset,
        autoCapture: typing.Union[MetaOapg.properties.autoCapture, bool, schemas.Unset] = schemas.unset,
        verificationSuccessUrl: typing.Union[MetaOapg.properties.verificationSuccessUrl, str, schemas.Unset] = schemas.unset,
        verificationFailureUrl: typing.Union[MetaOapg.properties.verificationFailureUrl, str, schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        encryptedData: typing.Union[MetaOapg.properties.encryptedData, str, schemas.Unset] = schemas.unset,
        channel: typing.Union[MetaOapg.properties.channel, str, uuid.UUID, 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],
    ) -> 'PaymentCreationRequest':
        return super().__new__(
            cls,
            *_args,
            amount=amount,
            metadata=metadata,
            idempotencyKey=idempotencyKey,
            source=source,
            verification=verification,
            keyId=keyId,
            autoCapture=autoCapture,
            verificationSuccessUrl=verificationSuccessUrl,
            verificationFailureUrl=verificationFailureUrl,
            description=description,
            encryptedData=encryptedData,
            channel=channel,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.fiat_money_usd import FiatMoneyUsd
from circle.model.metadata_payment import MetadataPayment
from circle.model.source import Source
