# 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.37.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 AccountBase(
    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:
        
            @staticmethod
            def access_status() -> typing.Type['AccountAccessStatus']:
                return AccountAccessStatus
            
            
            class account_number(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    max_length = 50
            
            
            class account_number_masked(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    max_length = 50
            account_purpose = schemas.StrSchema
        
            @staticmethod
            def account_type() -> typing.Type['AccountType']:
                return AccountType
            application_id = schemas.UUIDSchema
            
            
            class balances(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Balance']:
                        return Balance
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['Balance'], typing.List['Balance']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'balances':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Balance':
                    return super().__getitem__(i)
            
            
            class bank_routing(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    max_length = 9
            creation_time = schemas.DateTimeSchema
            
            
            class currency(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    regex=[{
                        'pattern': r'^[A-Z]{3}$',  # noqa: E501
                    }]
            
            
            class customer_ids(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    items = schemas.UUIDSchema
            
                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, uuid.UUID, ]], typing.List[typing.Union[MetaOapg.items, str, uuid.UUID, ]]],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'customer_ids':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> MetaOapg.items:
                    return super().__getitem__(i)
        
            @staticmethod
            def customer_type() -> typing.Type['CustomerType']:
                return CustomerType
            
            
            class exchange_rate_type(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    max_length = 10
            
            
            class iban(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    max_length = 34
            id = schemas.UUIDSchema
            is_account_pool = schemas.BoolSchema
            is_ach_enabled = schemas.BoolSchema
            is_card_enabled = schemas.BoolSchema
            is_external_card_enabled = schemas.BoolSchema
            is_p2p_enabled = schemas.BoolSchema
            is_sar_enabled = schemas.BoolSchema
            is_wire_enabled = schemas.BoolSchema
            last_updated_time = schemas.DateTimeSchema
            metadata = schemas.DictSchema
            nickname = schemas.StrSchema
        
            @staticmethod
            def status() -> typing.Type['Status']:
                return Status
            
            
            class swift_code(
                schemas.StrSchema
            ):
            
            
                class MetaOapg:
                    max_length = 11
                    min_length = 8
            tenant = schemas.StrSchema
            __annotations__ = {
                "access_status": access_status,
                "account_number": account_number,
                "account_number_masked": account_number_masked,
                "account_purpose": account_purpose,
                "account_type": account_type,
                "application_id": application_id,
                "balances": balances,
                "bank_routing": bank_routing,
                "creation_time": creation_time,
                "currency": currency,
                "customer_ids": customer_ids,
                "customer_type": customer_type,
                "exchange_rate_type": exchange_rate_type,
                "iban": iban,
                "id": id,
                "is_account_pool": is_account_pool,
                "is_ach_enabled": is_ach_enabled,
                "is_card_enabled": is_card_enabled,
                "is_external_card_enabled": is_external_card_enabled,
                "is_p2p_enabled": is_p2p_enabled,
                "is_sar_enabled": is_sar_enabled,
                "is_wire_enabled": is_wire_enabled,
                "last_updated_time": last_updated_time,
                "metadata": metadata,
                "nickname": nickname,
                "status": status,
                "swift_code": swift_code,
                "tenant": tenant,
            }
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["access_status"]) -> 'AccountAccessStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["account_number"]) -> MetaOapg.properties.account_number: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["account_number_masked"]) -> MetaOapg.properties.account_number_masked: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["account_purpose"]) -> MetaOapg.properties.account_purpose: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["account_type"]) -> 'AccountType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["application_id"]) -> MetaOapg.properties.application_id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["balances"]) -> MetaOapg.properties.balances: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["bank_routing"]) -> MetaOapg.properties.bank_routing: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["creation_time"]) -> MetaOapg.properties.creation_time: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["currency"]) -> MetaOapg.properties.currency: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["customer_ids"]) -> MetaOapg.properties.customer_ids: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["customer_type"]) -> 'CustomerType': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["exchange_rate_type"]) -> MetaOapg.properties.exchange_rate_type: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["iban"]) -> MetaOapg.properties.iban: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_account_pool"]) -> MetaOapg.properties.is_account_pool: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_ach_enabled"]) -> MetaOapg.properties.is_ach_enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_card_enabled"]) -> MetaOapg.properties.is_card_enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_external_card_enabled"]) -> MetaOapg.properties.is_external_card_enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_p2p_enabled"]) -> MetaOapg.properties.is_p2p_enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_sar_enabled"]) -> MetaOapg.properties.is_sar_enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["is_wire_enabled"]) -> MetaOapg.properties.is_wire_enabled: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["last_updated_time"]) -> MetaOapg.properties.last_updated_time: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["metadata"]) -> MetaOapg.properties.metadata: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["nickname"]) -> MetaOapg.properties.nickname: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'Status': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["swift_code"]) -> MetaOapg.properties.swift_code: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["tenant"]) -> MetaOapg.properties.tenant: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["access_status", "account_number", "account_number_masked", "account_purpose", "account_type", "application_id", "balances", "bank_routing", "creation_time", "currency", "customer_ids", "customer_type", "exchange_rate_type", "iban", "id", "is_account_pool", "is_ach_enabled", "is_card_enabled", "is_external_card_enabled", "is_p2p_enabled", "is_sar_enabled", "is_wire_enabled", "last_updated_time", "metadata", "nickname", "status", "swift_code", "tenant", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["access_status"]) -> typing.Union['AccountAccessStatus', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["account_number"]) -> typing.Union[MetaOapg.properties.account_number, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["account_number_masked"]) -> typing.Union[MetaOapg.properties.account_number_masked, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["account_purpose"]) -> typing.Union[MetaOapg.properties.account_purpose, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["account_type"]) -> typing.Union['AccountType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["application_id"]) -> typing.Union[MetaOapg.properties.application_id, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["balances"]) -> typing.Union[MetaOapg.properties.balances, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["bank_routing"]) -> typing.Union[MetaOapg.properties.bank_routing, 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["currency"]) -> typing.Union[MetaOapg.properties.currency, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["customer_ids"]) -> typing.Union[MetaOapg.properties.customer_ids, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["customer_type"]) -> typing.Union['CustomerType', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["exchange_rate_type"]) -> typing.Union[MetaOapg.properties.exchange_rate_type, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["iban"]) -> typing.Union[MetaOapg.properties.iban, 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["is_account_pool"]) -> typing.Union[MetaOapg.properties.is_account_pool, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["is_ach_enabled"]) -> typing.Union[MetaOapg.properties.is_ach_enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["is_card_enabled"]) -> typing.Union[MetaOapg.properties.is_card_enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["is_external_card_enabled"]) -> typing.Union[MetaOapg.properties.is_external_card_enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["is_p2p_enabled"]) -> typing.Union[MetaOapg.properties.is_p2p_enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["is_sar_enabled"]) -> typing.Union[MetaOapg.properties.is_sar_enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["is_wire_enabled"]) -> typing.Union[MetaOapg.properties.is_wire_enabled, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["last_updated_time"]) -> typing.Union[MetaOapg.properties.last_updated_time, 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["nickname"]) -> typing.Union[MetaOapg.properties.nickname, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union['Status', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["swift_code"]) -> typing.Union[MetaOapg.properties.swift_code, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["tenant"]) -> typing.Union[MetaOapg.properties.tenant, 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["access_status", "account_number", "account_number_masked", "account_purpose", "account_type", "application_id", "balances", "bank_routing", "creation_time", "currency", "customer_ids", "customer_type", "exchange_rate_type", "iban", "id", "is_account_pool", "is_ach_enabled", "is_card_enabled", "is_external_card_enabled", "is_p2p_enabled", "is_sar_enabled", "is_wire_enabled", "last_updated_time", "metadata", "nickname", "status", "swift_code", "tenant", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *_args: typing.Union[dict, frozendict.frozendict, ],
        access_status: typing.Union['AccountAccessStatus', schemas.Unset] = schemas.unset,
        account_number: typing.Union[MetaOapg.properties.account_number, str, schemas.Unset] = schemas.unset,
        account_number_masked: typing.Union[MetaOapg.properties.account_number_masked, str, schemas.Unset] = schemas.unset,
        account_purpose: typing.Union[MetaOapg.properties.account_purpose, str, schemas.Unset] = schemas.unset,
        account_type: typing.Union['AccountType', schemas.Unset] = schemas.unset,
        application_id: typing.Union[MetaOapg.properties.application_id, str, uuid.UUID, schemas.Unset] = schemas.unset,
        balances: typing.Union[MetaOapg.properties.balances, list, tuple, schemas.Unset] = schemas.unset,
        bank_routing: typing.Union[MetaOapg.properties.bank_routing, str, schemas.Unset] = schemas.unset,
        creation_time: typing.Union[MetaOapg.properties.creation_time, str, datetime, schemas.Unset] = schemas.unset,
        currency: typing.Union[MetaOapg.properties.currency, str, schemas.Unset] = schemas.unset,
        customer_ids: typing.Union[MetaOapg.properties.customer_ids, list, tuple, schemas.Unset] = schemas.unset,
        customer_type: typing.Union['CustomerType', schemas.Unset] = schemas.unset,
        exchange_rate_type: typing.Union[MetaOapg.properties.exchange_rate_type, str, schemas.Unset] = schemas.unset,
        iban: typing.Union[MetaOapg.properties.iban, str, schemas.Unset] = schemas.unset,
        id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, schemas.Unset] = schemas.unset,
        is_account_pool: typing.Union[MetaOapg.properties.is_account_pool, bool, schemas.Unset] = schemas.unset,
        is_ach_enabled: typing.Union[MetaOapg.properties.is_ach_enabled, bool, schemas.Unset] = schemas.unset,
        is_card_enabled: typing.Union[MetaOapg.properties.is_card_enabled, bool, schemas.Unset] = schemas.unset,
        is_external_card_enabled: typing.Union[MetaOapg.properties.is_external_card_enabled, bool, schemas.Unset] = schemas.unset,
        is_p2p_enabled: typing.Union[MetaOapg.properties.is_p2p_enabled, bool, schemas.Unset] = schemas.unset,
        is_sar_enabled: typing.Union[MetaOapg.properties.is_sar_enabled, bool, schemas.Unset] = schemas.unset,
        is_wire_enabled: typing.Union[MetaOapg.properties.is_wire_enabled, bool, schemas.Unset] = schemas.unset,
        last_updated_time: typing.Union[MetaOapg.properties.last_updated_time, str, datetime, schemas.Unset] = schemas.unset,
        metadata: typing.Union[MetaOapg.properties.metadata, dict, frozendict.frozendict, schemas.Unset] = schemas.unset,
        nickname: typing.Union[MetaOapg.properties.nickname, str, schemas.Unset] = schemas.unset,
        status: typing.Union['Status', schemas.Unset] = schemas.unset,
        swift_code: typing.Union[MetaOapg.properties.swift_code, str, schemas.Unset] = schemas.unset,
        tenant: typing.Union[MetaOapg.properties.tenant, str, 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],
    ) -> 'AccountBase':
        return super().__new__(
            cls,
            *_args,
            access_status=access_status,
            account_number=account_number,
            account_number_masked=account_number_masked,
            account_purpose=account_purpose,
            account_type=account_type,
            application_id=application_id,
            balances=balances,
            bank_routing=bank_routing,
            creation_time=creation_time,
            currency=currency,
            customer_ids=customer_ids,
            customer_type=customer_type,
            exchange_rate_type=exchange_rate_type,
            iban=iban,
            id=id,
            is_account_pool=is_account_pool,
            is_ach_enabled=is_ach_enabled,
            is_card_enabled=is_card_enabled,
            is_external_card_enabled=is_external_card_enabled,
            is_p2p_enabled=is_p2p_enabled,
            is_sar_enabled=is_sar_enabled,
            is_wire_enabled=is_wire_enabled,
            last_updated_time=last_updated_time,
            metadata=metadata,
            nickname=nickname,
            status=status,
            swift_code=swift_code,
            tenant=tenant,
            _configuration=_configuration,
            **kwargs,
        )

from synctera_client.model.account_access_status import AccountAccessStatus
from synctera_client.model.account_type import AccountType
from synctera_client.model.balance import Balance
from synctera_client.model.customer_type import CustomerType
from synctera_client.model.status import Status
