# 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 CodeDto(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    EasyQRコードオブジェクト
    """


    class MetaOapg:
        
        class properties:
            id = schemas.StrSchema
            object = schemas.StrSchema
            liveMode = schemas.BoolSchema
            codeUrl = schemas.StrSchema
            amount = schemas.IntSchema
            currency = schemas.StrSchema
            orderNo = schemas.StrSchema
            description = schemas.StrSchema
            
            
            class extra(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.StrSchema
                
                def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[MetaOapg.additional_properties, str, ],
                ) -> 'extra':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                        **kwargs,
                    )
            
            
            class metadata(
                schemas.DictSchema
            ):
            
            
                class MetaOapg:
                    additional_properties = schemas.StrSchema
                
                def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)
                
                def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)
            
                def __new__(
                    cls,
                    *args: typing.Union[dict, frozendict.frozendict, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                    **kwargs: typing.Union[MetaOapg.additional_properties, str, ],
                ) -> 'metadata':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                        **kwargs,
                    )
        
            @staticmethod
            def status() -> typing.Type['CodeStatusType']:
                return CodeStatusType
        
            @staticmethod
            def charge() -> typing.Type['ChargeDto']:
                return ChargeDto
            frontUrl = schemas.StrSchema
            
            
            class items(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['CodeItem']:
                        return CodeItem
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['CodeItem'], typing.List['CodeItem']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'items':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'CodeItem':
                    return super().__getitem__(i)
            expired = schemas.BoolSchema
            expiryTime = schemas.Int64Schema
            expiryPeriod = schemas.Int64Schema
            createTime = schemas.Int64Schema
            __annotations__ = {
                "id": id,
                "object": object,
                "liveMode": liveMode,
                "codeUrl": codeUrl,
                "amount": amount,
                "currency": currency,
                "orderNo": orderNo,
                "description": description,
                "extra": extra,
                "metadata": metadata,
                "status": status,
                "charge": charge,
                "frontUrl": frontUrl,
                "items": items,
                "expired": expired,
                "expiryTime": expiryTime,
                "expiryPeriod": expiryPeriod,
                "createTime": createTime,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["object"]) -> MetaOapg.properties.object: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["liveMode"]) -> MetaOapg.properties.liveMode: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["codeUrl"]) -> MetaOapg.properties.codeUrl: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["currency"]) -> MetaOapg.properties.currency: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["orderNo"]) -> MetaOapg.properties.orderNo: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["extra"]) -> MetaOapg.properties.extra: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'CodeStatusType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["charge"]) -> 'ChargeDto': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["frontUrl"]) -> MetaOapg.properties.frontUrl: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["items"]) -> MetaOapg.properties.items: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expired"]) -> MetaOapg.properties.expired: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expiryTime"]) -> MetaOapg.properties.expiryTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expiryPeriod"]) -> MetaOapg.properties.expiryPeriod: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createTime"]) -> MetaOapg.properties.createTime: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "object", "liveMode", "codeUrl", "amount", "currency", "orderNo", "description", "extra", "metadata", "status", "charge", "frontUrl", "items", "expired", "expiryTime", "expiryPeriod", "createTime", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["object"]) -> typing.Union[MetaOapg.properties.object, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["liveMode"]) -> typing.Union[MetaOapg.properties.liveMode, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["codeUrl"]) -> typing.Union[MetaOapg.properties.codeUrl, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> typing.Union[MetaOapg.properties.amount, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["currency"]) -> typing.Union[MetaOapg.properties.currency, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["orderNo"]) -> typing.Union[MetaOapg.properties.orderNo, 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["extra"]) -> typing.Union[MetaOapg.properties.extra, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["metadata"]) -> typing.Union[MetaOapg.properties.metadata, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['CodeStatusType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["charge"]) -> typing.Union['ChargeDto', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["frontUrl"]) -> typing.Union[MetaOapg.properties.frontUrl, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["items"]) -> typing.Union[MetaOapg.properties.items, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expired"]) -> typing.Union[MetaOapg.properties.expired, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expiryTime"]) -> typing.Union[MetaOapg.properties.expiryTime, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expiryPeriod"]) -> typing.Union[MetaOapg.properties.expiryPeriod, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createTime"]) -> typing.Union[MetaOapg.properties.createTime, 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", "object", "liveMode", "codeUrl", "amount", "currency", "orderNo", "description", "extra", "metadata", "status", "charge", "frontUrl", "items", "expired", "expiryTime", "expiryPeriod", "createTime", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        id: typing.Union[MetaOapg.properties.id, str, schemas.Unset] = schemas.unset,
        object: typing.Union[MetaOapg.properties.object, str, schemas.Unset] = schemas.unset,
        liveMode: typing.Union[MetaOapg.properties.liveMode, bool, schemas.Unset] = schemas.unset,
        codeUrl: typing.Union[MetaOapg.properties.codeUrl, str, schemas.Unset] = schemas.unset,
        amount: typing.Union[MetaOapg.properties.amount, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        currency: typing.Union[MetaOapg.properties.currency, str, schemas.Unset] = schemas.unset,
        orderNo: typing.Union[MetaOapg.properties.orderNo, str, schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        extra: typing.Union[MetaOapg.properties.extra, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        status: typing.Union['CodeStatusType', schemas.Unset] = schemas.unset,
        charge: typing.Union['ChargeDto', schemas.Unset] = schemas.unset,
        frontUrl: typing.Union[MetaOapg.properties.frontUrl, str, schemas.Unset] = schemas.unset,
        items: typing.Union[MetaOapg.properties.items, list, tuple, schemas.Unset] = schemas.unset,
        expired: typing.Union[MetaOapg.properties.expired, bool, schemas.Unset] = schemas.unset,
        expiryTime: typing.Union[MetaOapg.properties.expiryTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        expiryPeriod: typing.Union[MetaOapg.properties.expiryPeriod, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        createTime: typing.Union[MetaOapg.properties.createTime, decimal.Decimal, int, 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],
    ) -> 'CodeDto':
        return super().__new__(
            cls,
            *args,
            id=id,
            object=object,
            liveMode=liveMode,
            codeUrl=codeUrl,
            amount=amount,
            currency=currency,
            orderNo=orderNo,
            description=description,
            extra=extra,
            metadata=metadata,
            status=status,
            charge=charge,
            frontUrl=frontUrl,
            items=items,
            expired=expired,
            expiryTime=expiryTime,
            expiryPeriod=expiryPeriod,
            createTime=createTime,
            _configuration=_configuration,
            **kwargs,
        )

from elepay.model.charge_dto import ChargeDto
from elepay.model.code_item import CodeItem
from elepay.model.code_status_type import CodeStatusType
