# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .bank_account_value_allowed import BankAccountValueAllowed
from .validation_type import ValidationType


@JsonMap({"type_": "type"})
class BankAccountGuide(BaseModel):
    """BankAccountGuide

    :param key: The key of the field.
    :type key: str
    :param label: Label for this field., defaults to None
    :type label: str, optional
    :param required: Whether the field is required or not.
    :type required: bool
    :param values_allowed: values_allowed, defaults to None
    :type values_allowed: List[BankAccountValueAllowed], optional
    :param validations: validations, defaults to None
    :type validations: List[ValidationType], optional
    :param type_: Type of the field, defaults to None
    :type type_: str, optional
    """

    def __init__(
        self,
        key: str,
        required: bool,
        label: str = None,
        values_allowed: List[BankAccountValueAllowed] = None,
        validations: List[ValidationType] = None,
        type_: str = None,
    ):
        self.key = key
        if label is not None:
            self.label = label
        self.required = required
        if values_allowed is not None:
            self.values_allowed = self._define_list(
                values_allowed, BankAccountValueAllowed
            )
        if validations is not None:
            self.validations = self._define_list(validations, ValidationType)
        if type_ is not None:
            self.type_ = type_
