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

from enum import Enum
from .utils.json_map import JsonMap
from .base import BaseModel


class LetterRequestType(Enum):
    """An enumeration representing different categories.

    :cvar VISA_APPLICATION_FOR_PERSONAL_TRIP: "VISA_APPLICATION_FOR_PERSONAL_TRIP"
    :vartype VISA_APPLICATION_FOR_PERSONAL_TRIP: str
    :cvar VISA_APPLICATION_FOR_BUSINESS_TRIP: "VISA_APPLICATION_FOR_BUSINESS_TRIP"
    :vartype VISA_APPLICATION_FOR_BUSINESS_TRIP: str
    :cvar VISA_RENEWAL_CERTIFICATE: "VISA_RENEWAL_CERTIFICATE"
    :vartype VISA_RENEWAL_CERTIFICATE: str
    :cvar NO_OBJECTION_CERTIFICATE_FOR_TRAVELLING: "NO_OBJECTION_CERTIFICATE_FOR_TRAVELLING"
    :vartype NO_OBJECTION_CERTIFICATE_FOR_TRAVELLING: str
    :cvar BANK_VERIFICATION_OR_SALARY_CERTIFICATE: "BANK_VERIFICATION_OR_SALARY_CERTIFICATE"
    :vartype BANK_VERIFICATION_OR_SALARY_CERTIFICATE: str
    :cvar CUSTOMISED: "CUSTOMISED"
    :vartype CUSTOMISED: str
    """

    VISA_APPLICATION_FOR_PERSONAL_TRIP = "VISA_APPLICATION_FOR_PERSONAL_TRIP"
    VISA_APPLICATION_FOR_BUSINESS_TRIP = "VISA_APPLICATION_FOR_BUSINESS_TRIP"
    VISA_RENEWAL_CERTIFICATE = "VISA_RENEWAL_CERTIFICATE"
    NO_OBJECTION_CERTIFICATE_FOR_TRAVELLING = "NO_OBJECTION_CERTIFICATE_FOR_TRAVELLING"
    BANK_VERIFICATION_OR_SALARY_CERTIFICATE = "BANK_VERIFICATION_OR_SALARY_CERTIFICATE"
    CUSTOMISED = "CUSTOMISED"

    def list():
        """Lists all category values.

        :return: A list of all category values.
        :rtype: list
        """
        return list(map(lambda x: x.value, LetterRequestType._member_map_.values()))


@JsonMap({"include_qr_code": "includeQRCode", "type_": "type"})
class LetterRequest(BaseModel):
    """LetterRequest

    :param description: Description of the letter (minimum 25 characters)
    :type description: str
    :param include_qr_code: Flag indicating whether to include a QR code, defaults to None
    :type include_qr_code: bool, optional
    :param type_: type_
    :type type_: LetterRequestType
    """

    def __init__(
        self, description: str, type_: LetterRequestType, include_qr_code: bool = None
    ):
        self.description = description
        if include_qr_code is not None:
            self.include_qr_code = include_qr_code
        self.type_ = self._enum_matching(type_, LetterRequestType.list(), "type_")
