# 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 BasicChargeback(
    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 = {
            "merchantId",
            "paymentId",
            "history",
            "id",
            "reasonCode",
            "status",
        }
        
        class properties:
            id = schemas.UUIDSchema
            paymentId = schemas.UUIDSchema
            merchantId = schemas.UUIDSchema
            reasonCode = schemas.StrSchema
        
            @staticmethod
            def status() -> typing.Type['ChargebackStatus']:
                return ChargebackStatus
            
            
            class history(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    min_items = 1
                    
                    @staticmethod
                    def items() -> typing.Type['BasicChargebackHistory']:
                        return BasicChargebackHistory
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['BasicChargebackHistory'], typing.List['BasicChargebackHistory']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'history':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'BasicChargebackHistory':
                    return super().__getitem__(i)
        
            @staticmethod
            def category() -> typing.Type['ChargebackCategories']:
                return ChargebackCategories
            __annotations__ = {
                "id": id,
                "paymentId": paymentId,
                "merchantId": merchantId,
                "reasonCode": reasonCode,
                "status": status,
                "history": history,
                "category": category,
            }
    
    merchantId: MetaOapg.properties.merchantId
    paymentId: MetaOapg.properties.paymentId
    history: MetaOapg.properties.history
    id: MetaOapg.properties.id
    reasonCode: MetaOapg.properties.reasonCode
    status: 'ChargebackStatus'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["paymentId"]) -> MetaOapg.properties.paymentId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["merchantId"]) -> MetaOapg.properties.merchantId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["reasonCode"]) -> MetaOapg.properties.reasonCode: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ChargebackStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["history"]) -> MetaOapg.properties.history: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["category"]) -> 'ChargebackCategories': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "paymentId", "merchantId", "reasonCode", "status", "history", "category", ], 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["paymentId"]) -> MetaOapg.properties.paymentId: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["merchantId"]) -> MetaOapg.properties.merchantId: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["reasonCode"]) -> MetaOapg.properties.reasonCode: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'ChargebackStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["history"]) -> MetaOapg.properties.history: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["category"]) -> typing.Union['ChargebackCategories', 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", "paymentId", "merchantId", "reasonCode", "status", "history", "category", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        merchantId: typing.Union[MetaOapg.properties.merchantId, str, uuid.UUID, ],
        paymentId: typing.Union[MetaOapg.properties.paymentId, str, uuid.UUID, ],
        history: typing.Union[MetaOapg.properties.history, list, tuple, ],
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ],
        reasonCode: typing.Union[MetaOapg.properties.reasonCode, str, ],
        status: 'ChargebackStatus',
        category: typing.Union['ChargebackCategories', 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],
    ) -> 'BasicChargeback':
        return super().__new__(
            cls,
            *_args,
            merchantId=merchantId,
            paymentId=paymentId,
            history=history,
            id=id,
            reasonCode=reasonCode,
            status=status,
            category=category,
            _configuration=_configuration,
            **kwargs,
        )

from circle.model.basic_chargeback_history import BasicChargebackHistory
from circle.model.chargeback_categories import ChargebackCategories
from circle.model.chargeback_status import ChargebackStatus
