# coding: utf-8

"""
    Marqeta Core API

    Simplified management of your payment programs  # noqa: E501

    The version of the OpenAPI document: 3.0.0
    Contact: dev@swadesh.co
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


from __future__ import annotations
from inspect import getfullargspec
import pprint
import re  # noqa: F401
import json

from datetime import datetime
from typing import Optional
from pydantic import BaseModel, Field, StrictBool, StrictStr

class BaseAchExtendedResponseModel(BaseModel):
    """
    BaseAchExtendedResponseModel
    """
    created_time: datetime = Field(..., description="yyyy-MM-ddTHH:mm:ssZ")
    last_modified_time: datetime = Field(..., description="yyyy-MM-ddTHH:mm:ssZ")
    token: StrictStr = ...
    account_suffix: StrictStr = ...
    verification_status: Optional[StrictStr] = None
    account_type: StrictStr = ...
    name_on_account: StrictStr = ...
    bank_name: Optional[StrictStr] = None
    active: StrictBool = ...
    date_sent_for_verification: Optional[datetime] = None
    partner: Optional[StrictStr] = None
    partner_account_link_reference_token: Optional[StrictStr] = None
    is_default_account: Optional[StrictBool] = False
    date_verified: Optional[datetime] = None
    verification_override: Optional[StrictBool] = False
    verification_notes: Optional[StrictStr] = None
    routing_number: Optional[StrictStr] = None
    account_number: Optional[StrictStr] = None
    __properties = ["created_time", "last_modified_time", "token", "account_suffix", "verification_status", "account_type", "name_on_account", "bank_name", "active", "date_sent_for_verification", "partner", "partner_account_link_reference_token", "is_default_account", "date_verified", "verification_override", "verification_notes", "routing_number", "account_number"]

    class Config:
        allow_population_by_field_name = True
        validate_assignment = True

    def to_str(self) -> str:
        """Returns the string representation of the model using alias"""
        return pprint.pformat(self.dict(by_alias=True))

    def to_json(self) -> str:
        """Returns the JSON representation of the model using alias"""
        return json.dumps(self.to_dict())

    @classmethod
    def from_json(cls, json_str: str) -> BaseAchExtendedResponseModel:
        """Create an instance of BaseAchExtendedResponseModel from a JSON string"""
        return cls.from_dict(json.loads(json_str))

    def to_dict(self):
        """Returns the dictionary representation of the model using alias"""
        _dict = self.dict(by_alias=True,
                          exclude={
                          },
                          exclude_none=True)
        return _dict

    @classmethod
    def from_dict(cls, obj: dict) -> BaseAchExtendedResponseModel:
        """Create an instance of BaseAchExtendedResponseModel from a dict"""
        if obj is None:
            return None

        if type(obj) is not dict:
            return BaseAchExtendedResponseModel.parse_obj(obj)

        _obj = BaseAchExtendedResponseModel.parse_obj({
            "created_time": obj.get("created_time"),
            "last_modified_time": obj.get("last_modified_time"),
            "token": obj.get("token"),
            "account_suffix": obj.get("account_suffix"),
            "verification_status": obj.get("verification_status"),
            "account_type": obj.get("account_type"),
            "name_on_account": obj.get("name_on_account"),
            "bank_name": obj.get("bank_name"),
            "active": obj.get("active") if obj.get("active") is not None else False,
            "date_sent_for_verification": obj.get("date_sent_for_verification"),
            "partner": obj.get("partner"),
            "partner_account_link_reference_token": obj.get("partner_account_link_reference_token"),
            "is_default_account": obj.get("is_default_account") if obj.get("is_default_account") is not None else False,
            "date_verified": obj.get("date_verified"),
            "verification_override": obj.get("verification_override") if obj.get("verification_override") is not None else False,
            "verification_notes": obj.get("verification_notes"),
            "routing_number": obj.get("routing_number"),
            "account_number": obj.get("account_number")
        })
        return _obj

