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

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


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

    :cvar ADDON_TYPE: "ADDON_TYPE"
    :vartype ADDON_TYPE: str
    :cvar NET_PRICE: "NET_PRICE"
    :vartype NET_PRICE: str
    :cvar RACK_RATES: "RACK_RATES"
    :vartype RACK_RATES: str
    :cvar MAX_ROOMS_IN_RESERVATION: "MAX_ROOMS_IN_RESERVATION"
    :vartype MAX_ROOMS_IN_RESERVATION: str
    :cvar SMOKING_STATUS: "SMOKING_STATUS"
    :vartype SMOKING_STATUS: str
    :cvar IMPORTANT_INFORMATION: "IMPORTANT_INFORMATION"
    :vartype IMPORTANT_INFORMATION: str
    :cvar ALL_EXTRA_CHARGES: "ALL_EXTRA_CHARGES"
    :vartype ALL_EXTRA_CHARGES: str
    :cvar ADDITIONAL_ROOM_INFO: "ADDITIONAL_ROOM_INFO"
    :vartype ADDITIONAL_ROOM_INFO: str
    :cvar GROUP_RECOMMENDATIONS: "GROUP_RECOMMENDATIONS"
    :vartype GROUP_RECOMMENDATIONS: str
    :cvar ROOM_TYPE_ID: "ROOM_TYPE_ID"
    :vartype ROOM_TYPE_ID: str
    :cvar CC_REQUIRED: "CC_REQUIRED"
    :vartype CC_REQUIRED: str
    :cvar SHOW_CONDITIONAL_CHARGES: "SHOW_CONDITIONAL_CHARGES"
    :vartype SHOW_CONDITIONAL_CHARGES: str
    :cvar POSTCARD_PHOTO: "POSTCARD_PHOTO"
    :vartype POSTCARD_PHOTO: str
    :cvar EXTRA_CHARGES: "EXTRA_CHARGES"
    :vartype EXTRA_CHARGES: str
    :cvar PHOTOS: "PHOTOS"
    :vartype PHOTOS: str
    :cvar INTERNET: "INTERNET"
    :vartype INTERNET: str
    :cvar IF_DOMESTIC_NO_CC: "IF_DOMESTIC_NO_CC"
    :vartype IF_DOMESTIC_NO_CC: str
    :cvar FACILITIES: "FACILITIES"
    :vartype FACILITIES: str
    :cvar EXTRA_BEDS: "EXTRA_BEDS"
    :vartype EXTRA_BEDS: str
    :cvar CANCELLATION_INFO: "CANCELLATION_INFO"
    :vartype CANCELLATION_INFO: str
    :cvar MEALPLANS: "MEALPLANS"
    :vartype MEALPLANS: str
    :cvar DEAL_LASTM: "DEAL_LASTM"
    :vartype DEAL_LASTM: str
    :cvar PAYMENT_TERMS: "PAYMENT_TERMS"
    :vartype PAYMENT_TERMS: str
    :cvar ALL_PRICES: "ALL_PRICES"
    :vartype ALL_PRICES: str
    :cvar BLOCK_PAYMENT_OPTIONS: "BLOCK_PAYMENT_OPTIONS"
    :vartype BLOCK_PAYMENT_OPTIONS: str
    :cvar MAX_CHILDREN_FREE_AGE: "MAX_CHILDREN_FREE_AGE"
    :vartype MAX_CHILDREN_FREE_AGE: str
    :cvar NUMBER_OF_ROOMS_LEFT: "NUMBER_OF_ROOMS_LEFT"
    :vartype NUMBER_OF_ROOMS_LEFT: str
    :cvar MAX_CHILDREN_FREE: "MAX_CHILDREN_FREE"
    :vartype MAX_CHILDREN_FREE: str
    :cvar POLICIES: "POLICIES"
    :vartype POLICIES: str
    :cvar PREPAYMENT_INFO: "PREPAYMENT_INFO"
    :vartype PREPAYMENT_INFO: str
    :cvar DEAL_FLASH: "DEAL_FLASH"
    :vartype DEAL_FLASH: str
    :cvar IF_NO_CC_ALLOWED: "IF_NO_CC_ALLOWED"
    :vartype IF_NO_CC_ALLOWED: str
    :cvar DEAL_SMART: "DEAL_SMART"
    :vartype DEAL_SMART: str
    :cvar ADDONS: "ADDONS"
    :vartype ADDONS: str
    :cvar ADDRESS_REQUIRED: "ADDRESS_REQUIRED"
    :vartype ADDRESS_REQUIRED: str
    """

    ADDON_TYPE = "ADDON_TYPE"
    NET_PRICE = "NET_PRICE"
    RACK_RATES = "RACK_RATES"
    MAX_ROOMS_IN_RESERVATION = "MAX_ROOMS_IN_RESERVATION"
    SMOKING_STATUS = "SMOKING_STATUS"
    IMPORTANT_INFORMATION = "IMPORTANT_INFORMATION"
    ALL_EXTRA_CHARGES = "ALL_EXTRA_CHARGES"
    ADDITIONAL_ROOM_INFO = "ADDITIONAL_ROOM_INFO"
    GROUP_RECOMMENDATIONS = "GROUP_RECOMMENDATIONS"
    ROOM_TYPE_ID = "ROOM_TYPE_ID"
    CC_REQUIRED = "CC_REQUIRED"
    SHOW_CONDITIONAL_CHARGES = "SHOW_CONDITIONAL_CHARGES"
    POSTCARD_PHOTO = "POSTCARD_PHOTO"
    EXTRA_CHARGES = "EXTRA_CHARGES"
    PHOTOS = "PHOTOS"
    INTERNET = "INTERNET"
    IF_DOMESTIC_NO_CC = "IF_DOMESTIC_NO_CC"
    FACILITIES = "FACILITIES"
    EXTRA_BEDS = "EXTRA_BEDS"
    CANCELLATION_INFO = "CANCELLATION_INFO"
    MEALPLANS = "MEALPLANS"
    DEAL_LASTM = "DEAL_LASTM"
    PAYMENT_TERMS = "PAYMENT_TERMS"
    ALL_PRICES = "ALL_PRICES"
    BLOCK_PAYMENT_OPTIONS = "BLOCK_PAYMENT_OPTIONS"
    MAX_CHILDREN_FREE_AGE = "MAX_CHILDREN_FREE_AGE"
    NUMBER_OF_ROOMS_LEFT = "NUMBER_OF_ROOMS_LEFT"
    MAX_CHILDREN_FREE = "MAX_CHILDREN_FREE"
    POLICIES = "POLICIES"
    PREPAYMENT_INFO = "PREPAYMENT_INFO"
    DEAL_FLASH = "DEAL_FLASH"
    IF_NO_CC_ALLOWED = "IF_NO_CC_ALLOWED"
    DEAL_SMART = "DEAL_SMART"
    ADDONS = "ADDONS"
    ADDRESS_REQUIRED = "ADDRESS_REQUIRED"

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

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


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

    :cvar AR: "AR"
    :vartype AR: str
    :cvar BG: "BG"
    :vartype BG: str
    :cvar CA: "CA"
    :vartype CA: str
    :cvar CS: "CS"
    :vartype CS: str
    :cvar DA: "DA"
    :vartype DA: str
    :cvar DE: "DE"
    :vartype DE: str
    :cvar EL: "EL"
    :vartype EL: str
    :cvar EN: "EN"
    :vartype EN: str
    :cvar EN_GB: "EN_GB"
    :vartype EN_GB: str
    :cvar EN_US: "EN_US"
    :vartype EN_US: str
    :cvar ES: "ES"
    :vartype ES: str
    :cvar ES_AR: "ES_AR"
    :vartype ES_AR: str
    :cvar ES_MX: "ES_MX"
    :vartype ES_MX: str
    :cvar ET: "ET"
    :vartype ET: str
    :cvar FI: "FI"
    :vartype FI: str
    :cvar FR: "FR"
    :vartype FR: str
    :cvar HE: "HE"
    :vartype HE: str
    :cvar HI: "HI"
    :vartype HI: str
    :cvar HR: "HR"
    :vartype HR: str
    :cvar HU: "HU"
    :vartype HU: str
    :cvar ID: "ID"
    :vartype ID: str
    :cvar IS: "IS"
    :vartype IS: str
    :cvar IT: "IT"
    :vartype IT: str
    :cvar JA: "JA"
    :vartype JA: str
    :cvar KA: "KA"
    :vartype KA: str
    :cvar KO: "KO"
    :vartype KO: str
    :cvar LT: "LT"
    :vartype LT: str
    :cvar LV: "LV"
    :vartype LV: str
    :cvar MS: "MS"
    :vartype MS: str
    :cvar NL: "NL"
    :vartype NL: str
    :cvar NO: "NO"
    :vartype NO: str
    :cvar PL: "PL"
    :vartype PL: str
    :cvar PT_BR: "PT_BR"
    :vartype PT_BR: str
    :cvar PT_PT: "PT_PT"
    :vartype PT_PT: str
    :cvar RO: "RO"
    :vartype RO: str
    :cvar RU: "RU"
    :vartype RU: str
    :cvar SK: "SK"
    :vartype SK: str
    :cvar SL: "SL"
    :vartype SL: str
    :cvar SR: "SR"
    :vartype SR: str
    :cvar SV: "SV"
    :vartype SV: str
    :cvar TH: "TH"
    :vartype TH: str
    :cvar TL: "TL"
    :vartype TL: str
    :cvar TR: "TR"
    :vartype TR: str
    :cvar UK: "UK"
    :vartype UK: str
    :cvar VI: "VI"
    :vartype VI: str
    :cvar ZH_CN: "ZH_CN"
    :vartype ZH_CN: str
    :cvar ZH_TW: "ZH_TW"
    :vartype ZH_TW: str
    """

    AR = "AR"
    BG = "BG"
    CA = "CA"
    CS = "CS"
    DA = "DA"
    DE = "DE"
    EL = "EL"
    EN = "EN"
    EN_GB = "EN_GB"
    EN_US = "EN_US"
    ES = "ES"
    ES_AR = "ES_AR"
    ES_MX = "ES_MX"
    ET = "ET"
    FI = "FI"
    FR = "FR"
    HE = "HE"
    HI = "HI"
    HR = "HR"
    HU = "HU"
    ID = "ID"
    IS = "IS"
    IT = "IT"
    JA = "JA"
    KA = "KA"
    KO = "KO"
    LT = "LT"
    LV = "LV"
    MS = "MS"
    NL = "NL"
    NO = "NO"
    PL = "PL"
    PT_BR = "PT_BR"
    PT_PT = "PT_PT"
    RO = "RO"
    RU = "RU"
    SK = "SK"
    SL = "SL"
    SR = "SR"
    SV = "SV"
    TH = "TH"
    TL = "TL"
    TR = "TR"
    UK = "UK"
    VI = "VI"
    ZH_CN = "ZH_CN"
    ZH_TW = "ZH_TW"

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

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


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

    :cvar ANDROID: "ANDROID"
    :vartype ANDROID: str
    :cvar DESKTOP: "DESKTOP"
    :vartype DESKTOP: str
    :cvar IOS: "IOS"
    :vartype IOS: str
    :cvar MOBILE: "MOBILE"
    :vartype MOBILE: str
    :cvar TABLET: "TABLET"
    :vartype TABLET: str
    """

    ANDROID = "ANDROID"
    DESKTOP = "DESKTOP"
    IOS = "IOS"
    MOBILE = "MOBILE"
    TABLET = "TABLET"

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

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


@JsonMap({})
class BlockAvailabilityInputDto(BaseModel):
    """BlockAvailabilityInputDto

    :param hotel_ids: Hotel ID(s) to check availability for.
    :type hotel_ids: List[int]
    :param checkin: The arrival date.
    :type checkin: str
    :param checkout: The departure date. Must be later than {checkin}.
    :type checkout: str
    :param guest_cc: Guest country code. Used to accurately display the best prices and price details for people from that country.
    :type guest_cc: str
    :param currency: Returns the prices in this currency, in addition to the hotel currency., defaults to None
    :type currency: str, optional
    :param extras: The extra items for this request. See the documentation for more details about each extra., defaults to None
    :type extras: List[BlockAvailabilityInputDtoExtras], optional
    :param affiliate_id: Application affiliate id, defaults to None
    :type affiliate_id: str, optional
    :param block_ids: Return only availability hits with these particular block IDs, defaults to None
    :type block_ids: List[str], optional
    :param guest_ip: Guest IP address for determining guest country and showing the best price for that user and obeying laws regarding the display of taxes and fees. , defaults to None
    :type guest_ip: str, optional
    :param guest_qty: Number of guests for which blocks will be found. The total number of guests is used for calculating city tax charges. It is specified as an array of guest numbers. If you use this parameter and make bookings through the API, you should also set the exact same value in the guest_quantities parameter for the processBooking call, otherwise per-person included charges may result in pricing problems, causing the booking to fail. NOTE: After version 2.6 either this or `room1` needs to be provided. , defaults to None
    :type guest_qty: List[int], optional
    :param language: Specify the language for: block_id, policies, room texts and hotel descriptions. Note: not all text is translated in all languages. Please check the "Possible Values" section of the documentation for the accepted language codes. , defaults to None
    :type language: BlockAvailabilityInputDtoLanguage, optional
    :param num_rooms: Takes a number of rooms to put guests into, defaults to None
    :type num_rooms: int, optional
    :param room1: Which guests to put in which rooms. Syntax: comma-separated list, `A` for each adult, a number in the range 0..17 for each child. , defaults to None
    :type room1: List[str], optional
    :param user_platform: The user's platform., defaults to None
    :type user_platform: BlockAvailabilityInputDtoUserPlatform, optional
    """

    def __init__(
        self,
        hotel_ids: List[int],
        checkin: str,
        checkout: str,
        guest_cc: str,
        currency: str = None,
        extras: List[BlockAvailabilityInputDtoExtras] = None,
        affiliate_id: str = None,
        block_ids: List[str] = None,
        guest_ip: str = None,
        guest_qty: List[int] = None,
        language: BlockAvailabilityInputDtoLanguage = None,
        num_rooms: int = None,
        room1: List[str] = None,
        user_platform: BlockAvailabilityInputDtoUserPlatform = None,
    ):
        self.hotel_ids = hotel_ids
        self.checkin = checkin
        self.checkout = checkout
        self.guest_cc = guest_cc
        if currency is not None:
            self.currency = currency
        if extras is not None:
            self.extras = self._define_list(extras, BlockAvailabilityInputDtoExtras)
        if affiliate_id is not None:
            self.affiliate_id = affiliate_id
        if block_ids is not None:
            self.block_ids = block_ids
        if guest_ip is not None:
            self.guest_ip = guest_ip
        if guest_qty is not None:
            self.guest_qty = guest_qty
        if language is not None:
            self.language = self._enum_matching(
                language, BlockAvailabilityInputDtoLanguage.list(), "language"
            )
        if num_rooms is not None:
            self.num_rooms = num_rooms
        if room1 is not None:
            self.room1 = room1
        if user_platform is not None:
            self.user_platform = self._enum_matching(
                user_platform,
                BlockAvailabilityInputDtoUserPlatform.list(),
                "user_platform",
            )
