"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from moovio_sdk import utils
from moovio_sdk.types import BaseModel
import pydantic
from typing import Optional
from typing_extensions import Annotated


class BankAccountValidationErrorData(BaseModel):
    account: Optional[str] = None

    plaid: Optional[str] = None

    plaid_link: Annotated[Optional[str], pydantic.Field(alias="plaidLink")] = None

    mx: Optional[str] = None

    error: Optional[str] = None


class BankAccountValidationError(Exception):
    data: BankAccountValidationErrorData

    def __init__(self, data: BankAccountValidationErrorData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, BankAccountValidationErrorData)
