# coding: utf-8

"""
    Synctera API

    <h2>Let's build something great.</h2><p>Welcome to the official reference documentation for Synctera APIs. Our APIs are the best way to automate your company's banking needs and are designed to be easy to understand and implement.</p><p>We're continuously growing this library and what you see here is just the start, but if you need something specific or have a question, <a class='text-blue-600' href='https://synctera.com/contact' target='_blank' rel='noreferrer'>contact us</a>.</p>  # noqa: E501

    The version of the OpenAPI document: 0.43.0
    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 synctera_client import schemas  # noqa: F401


class CardProduct(
    schemas.ComposedSchema,
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Card Product
    """


    class MetaOapg:
        
        
        class all_of_1(
            schemas.DictSchema
        ):
        
        
            class MetaOapg:
                required = {
                    "card_program_id",
                    "name",
                    "active",
                    "start_date",
                }
                
                class properties:
                    active = schemas.BoolSchema
                    card_program_id = schemas.UUIDSchema
                    
                    
                    class color(
                        schemas.StrSchema
                    ):
                    
                    
                        class MetaOapg:
                            regex=[{
                                'pattern': r'^[0-9A-F]{6}$',  # noqa: E501
                            }]
                    creation_time = schemas.DateTimeSchema
                
                    @staticmethod
                    def digital_wallet_tokenization() -> typing.Type['DigitalWalletTokenization']:
                        return DigitalWalletTokenization
                    end_date = schemas.DateTimeSchema
                    id = schemas.UUIDSchema
                    image = schemas.BoolSchema
                
                    @staticmethod
                    def image_mode() -> typing.Type['CardImageMode']:
                        return CardImageMode
                    issue_without_kyc = schemas.BoolSchema
                    last_modified_time = schemas.DateTimeSchema
                    
                    
                    class name(
                        schemas.StrSchema
                    ):
                    
                    
                        class MetaOapg:
                            max_length = 40
                            min_length = 1
                    
                    
                    class orientation(
                        schemas.EnumBase,
                        schemas.StrSchema
                    ):
                    
                    
                        class MetaOapg:
                            enum_value_to_name = {
                                "HORIZONTAL": "HORIZONTAL",
                                "VERTICAL": "VERTICAL",
                            }
                        
                        @schemas.classproperty
                        def HORIZONTAL(cls):
                            return cls("HORIZONTAL")
                        
                        @schemas.classproperty
                        def VERTICAL(cls):
                            return cls("VERTICAL")
                    
                    
                    class package_id(
                        schemas.StrSchema
                    ):
                    
                    
                        class MetaOapg:
                            max_length = 50
                            min_length = 1
                
                    @staticmethod
                    def physical_card_format() -> typing.Type['PhysicalCardFormat']:
                        return PhysicalCardFormat
                
                    @staticmethod
                    def return_address() -> typing.Type['Shipping']:
                        return Shipping
                    start_date = schemas.DateTimeSchema
                
                    @staticmethod
                    def three_ds_policy() -> typing.Type['ThreeDsPolicy']:
                        return ThreeDsPolicy
                
                    @staticmethod
                    def txn_enhancer() -> typing.Type['TxnEnhancer']:
                        return TxnEnhancer
                    __annotations__ = {
                        "active": active,
                        "card_program_id": card_program_id,
                        "color": color,
                        "creation_time": creation_time,
                        "digital_wallet_tokenization": digital_wallet_tokenization,
                        "end_date": end_date,
                        "id": id,
                        "image": image,
                        "image_mode": image_mode,
                        "issue_without_kyc": issue_without_kyc,
                        "last_modified_time": last_modified_time,
                        "name": name,
                        "orientation": orientation,
                        "package_id": package_id,
                        "physical_card_format": physical_card_format,
                        "return_address": return_address,
                        "start_date": start_date,
                        "three_ds_policy": three_ds_policy,
                        "txn_enhancer": txn_enhancer,
                    }
            
            card_program_id: MetaOapg.properties.card_program_id
            name: MetaOapg.properties.name
            active: MetaOapg.properties.active
            start_date: MetaOapg.properties.start_date
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["active"]) -> MetaOapg.properties.active: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["card_program_id"]) -> MetaOapg.properties.card_program_id: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["creation_time"]) -> MetaOapg.properties.creation_time: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["digital_wallet_tokenization"]) -> 'DigitalWalletTokenization': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["end_date"]) -> MetaOapg.properties.end_date: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["image"]) -> MetaOapg.properties.image: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["image_mode"]) -> 'CardImageMode': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["issue_without_kyc"]) -> MetaOapg.properties.issue_without_kyc: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["last_modified_time"]) -> MetaOapg.properties.last_modified_time: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["orientation"]) -> MetaOapg.properties.orientation: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["package_id"]) -> MetaOapg.properties.package_id: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["physical_card_format"]) -> 'PhysicalCardFormat': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["return_address"]) -> 'Shipping': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["start_date"]) -> MetaOapg.properties.start_date: ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["three_ds_policy"]) -> 'ThreeDsPolicy': ...
            
            @typing.overload
            def __getitem__(self, name: typing_extensions.Literal["txn_enhancer"]) -> 'TxnEnhancer': ...
            
            @typing.overload
            def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
            
            def __getitem__(self, name: typing.Union[typing_extensions.Literal["active", "card_program_id", "color", "creation_time", "digital_wallet_tokenization", "end_date", "id", "image", "image_mode", "issue_without_kyc", "last_modified_time", "name", "orientation", "package_id", "physical_card_format", "return_address", "start_date", "three_ds_policy", "txn_enhancer", ], str]):
                # dict_instance[name] accessor
                return super().__getitem__(name)
            
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["active"]) -> MetaOapg.properties.active: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["card_program_id"]) -> MetaOapg.properties.card_program_id: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["creation_time"]) -> typing.Union[MetaOapg.properties.creation_time, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["digital_wallet_tokenization"]) -> typing.Union['DigitalWalletTokenization', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["end_date"]) -> typing.Union[MetaOapg.properties.end_date, schemas.Unset]: ...
            
            @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["image"]) -> typing.Union[MetaOapg.properties.image, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["image_mode"]) -> typing.Union['CardImageMode', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["issue_without_kyc"]) -> typing.Union[MetaOapg.properties.issue_without_kyc, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["last_modified_time"]) -> typing.Union[MetaOapg.properties.last_modified_time, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["orientation"]) -> typing.Union[MetaOapg.properties.orientation, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["package_id"]) -> typing.Union[MetaOapg.properties.package_id, schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["physical_card_format"]) -> typing.Union['PhysicalCardFormat', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["return_address"]) -> typing.Union['Shipping', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["start_date"]) -> MetaOapg.properties.start_date: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["three_ds_policy"]) -> typing.Union['ThreeDsPolicy', schemas.Unset]: ...
            
            @typing.overload
            def get_item_oapg(self, name: typing_extensions.Literal["txn_enhancer"]) -> typing.Union['TxnEnhancer', 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["active", "card_program_id", "color", "creation_time", "digital_wallet_tokenization", "end_date", "id", "image", "image_mode", "issue_without_kyc", "last_modified_time", "name", "orientation", "package_id", "physical_card_format", "return_address", "start_date", "three_ds_policy", "txn_enhancer", ], str]):
                return super().get_item_oapg(name)
            
        
            def __new__(
                cls,
                *_args: typing.Union[dict, frozendict.frozendict, ],
                card_program_id: typing.Union[MetaOapg.properties.card_program_id, str, uuid.UUID, ],
                name: typing.Union[MetaOapg.properties.name, str, ],
                active: typing.Union[MetaOapg.properties.active, bool, ],
                start_date: typing.Union[MetaOapg.properties.start_date, str, datetime, ],
                color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset,
                creation_time: typing.Union[MetaOapg.properties.creation_time, str, datetime, schemas.Unset] = schemas.unset,
                digital_wallet_tokenization: typing.Union['DigitalWalletTokenization', schemas.Unset] = schemas.unset,
                end_date: typing.Union[MetaOapg.properties.end_date, str, datetime, schemas.Unset] = schemas.unset,
                id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, schemas.Unset] = schemas.unset,
                image: typing.Union[MetaOapg.properties.image, bool, schemas.Unset] = schemas.unset,
                image_mode: typing.Union['CardImageMode', schemas.Unset] = schemas.unset,
                issue_without_kyc: typing.Union[MetaOapg.properties.issue_without_kyc, bool, schemas.Unset] = schemas.unset,
                last_modified_time: typing.Union[MetaOapg.properties.last_modified_time, str, datetime, schemas.Unset] = schemas.unset,
                orientation: typing.Union[MetaOapg.properties.orientation, str, schemas.Unset] = schemas.unset,
                package_id: typing.Union[MetaOapg.properties.package_id, str, schemas.Unset] = schemas.unset,
                physical_card_format: typing.Union['PhysicalCardFormat', schemas.Unset] = schemas.unset,
                return_address: typing.Union['Shipping', schemas.Unset] = schemas.unset,
                three_ds_policy: typing.Union['ThreeDsPolicy', schemas.Unset] = schemas.unset,
                txn_enhancer: typing.Union['TxnEnhancer', 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],
            ) -> 'all_of_1':
                return super().__new__(
                    cls,
                    *_args,
                    card_program_id=card_program_id,
                    name=name,
                    active=active,
                    start_date=start_date,
                    color=color,
                    creation_time=creation_time,
                    digital_wallet_tokenization=digital_wallet_tokenization,
                    end_date=end_date,
                    id=id,
                    image=image,
                    image_mode=image_mode,
                    issue_without_kyc=issue_without_kyc,
                    last_modified_time=last_modified_time,
                    orientation=orientation,
                    package_id=package_id,
                    physical_card_format=physical_card_format,
                    return_address=return_address,
                    three_ds_policy=three_ds_policy,
                    txn_enhancer=txn_enhancer,
                    _configuration=_configuration,
                    **kwargs,
                )
        
        @classmethod
        @functools.lru_cache()
        def all_of(cls):
            # we need this here to make our import statements work
            # we must store _composed_schemas in here so the code is only run
            # when we invoke this method. If we kept this at the class
            # level we would get an error because the class level
            # code would be run when this module is imported, and these composed
            # classes don't exist yet because their module has not finished
            # loading
            return [
                CardFormat,
                cls.all_of_1,
            ]


    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
        _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],
    ) -> 'CardProduct':
        return super().__new__(
            cls,
            *_args,
            _configuration=_configuration,
            **kwargs,
        )

from synctera_client.model.card_format import CardFormat
from synctera_client.model.card_image_mode import CardImageMode
from synctera_client.model.digital_wallet_tokenization import DigitalWalletTokenization
from synctera_client.model.physical_card_format import PhysicalCardFormat
from synctera_client.model.shipping import Shipping
from synctera_client.model.three_ds_policy import ThreeDsPolicy
from synctera_client.model.txn_enhancer import TxnEnhancer
