# 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 SubscriptionDto(
    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:
            id = schemas.StrSchema
            appId = schemas.StrSchema
            object = schemas.StrSchema
            liveMode = schemas.BoolSchema
            customerId = schemas.StrSchema
        
            @staticmethod
            def customer() -> typing.Type['CustomerDto']:
                return CustomerDto
            nextChargeTime = schemas.Int64Schema
            isCharging = schemas.BoolSchema
            chargedPeriods = schemas.IntSchema
            
            
            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['SubscriptionStatusType']:
                return SubscriptionStatusType
            createTime = schemas.Int64Schema
            updateTime = schemas.Int64Schema
            __annotations__ = {
                "id": id,
                "appId": appId,
                "object": object,
                "liveMode": liveMode,
                "customerId": customerId,
                "customer": customer,
                "nextChargeTime": nextChargeTime,
                "isCharging": isCharging,
                "chargedPeriods": chargedPeriods,
                "metadata": metadata,
                "status": status,
                "createTime": createTime,
                "updateTime": updateTime,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ...
    
    @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["customerId"]) -> MetaOapg.properties.customerId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["customer"]) -> 'CustomerDto': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["nextChargeTime"]) -> MetaOapg.properties.nextChargeTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["isCharging"]) -> MetaOapg.properties.isCharging: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["chargedPeriods"]) -> MetaOapg.properties.chargedPeriods: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'SubscriptionStatusType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createTime"]) -> MetaOapg.properties.createTime: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updateTime"]) -> MetaOapg.properties.updateTime: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "appId", "object", "liveMode", "customerId", "customer", "nextChargeTime", "isCharging", "chargedPeriods", "metadata", "status", "createTime", "updateTime", ], 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["appId"]) -> typing.Union[MetaOapg.properties.appId, 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["customerId"]) -> typing.Union[MetaOapg.properties.customerId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["customer"]) -> typing.Union['CustomerDto', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["nextChargeTime"]) -> typing.Union[MetaOapg.properties.nextChargeTime, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["isCharging"]) -> typing.Union[MetaOapg.properties.isCharging, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["chargedPeriods"]) -> typing.Union[MetaOapg.properties.chargedPeriods, 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['SubscriptionStatusType', 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: typing_extensions.Literal["updateTime"]) -> typing.Union[MetaOapg.properties.updateTime, 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", "appId", "object", "liveMode", "customerId", "customer", "nextChargeTime", "isCharging", "chargedPeriods", "metadata", "status", "createTime", "updateTime", ], 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,
        appId: typing.Union[MetaOapg.properties.appId, 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,
        customerId: typing.Union[MetaOapg.properties.customerId, str, schemas.Unset] = schemas.unset,
        customer: typing.Union['CustomerDto', schemas.Unset] = schemas.unset,
        nextChargeTime: typing.Union[MetaOapg.properties.nextChargeTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        isCharging: typing.Union[MetaOapg.properties.isCharging, bool, schemas.Unset] = schemas.unset,
        chargedPeriods: typing.Union[MetaOapg.properties.chargedPeriods, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        status: typing.Union['SubscriptionStatusType', schemas.Unset] = schemas.unset,
        createTime: typing.Union[MetaOapg.properties.createTime, decimal.Decimal, int, schemas.Unset] = schemas.unset,
        updateTime: typing.Union[MetaOapg.properties.updateTime, 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],
    ) -> 'SubscriptionDto':
        return super().__new__(
            cls,
            *args,
            id=id,
            appId=appId,
            object=object,
            liveMode=liveMode,
            customerId=customerId,
            customer=customer,
            nextChargeTime=nextChargeTime,
            isCharging=isCharging,
            chargedPeriods=chargedPeriods,
            metadata=metadata,
            status=status,
            createTime=createTime,
            updateTime=updateTime,
            _configuration=_configuration,
            **kwargs,
        )

from elepay.model.customer_dto import CustomerDto
from elepay.model.subscription_status_type import SubscriptionStatusType
