# 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 HotelAvailabilityInputDtoUserPlatform(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,
                HotelAvailabilityInputDtoUserPlatform._member_map_.values(),
            )
        )


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

    :param checkin: The arrival date.
    :type checkin: str
    :param checkout: The departure date. Must be later than {checkin}. Must be between 1 and 30 days after {checkin}.
    :type checkout: str
    :param hotel_ids: Limit the result list to up to 1000 specified hotels where they have availability for the specified guests and dates., defaults to None
    :type hotel_ids: List[int], optional
    :param currency: Returns the price in this currency, defaults to None
    :type currency: str, optional
    :param guest_country: Guest country code. Used to accurately display the best prices and price details for people from that country.
    :type guest_country: str
    :param no_rooms: The only group will be split in the given number of rooms automatically
    :type no_rooms: int
    :param user_platform: The user's platform., defaults to None
    :type user_platform: HotelAvailabilityInputDtoUserPlatform, optional
    :param rows: The maximum number of results to return., defaults to None
    :type rows: int, optional
    :param page: Pagination token used to retrieve the next page of results. Obtained from `next_page`., defaults to None
    :type page: str, optional
    """

    def __init__(
        self,
        checkin: str,
        checkout: str,
        guest_country: str,
        no_rooms: int,
        hotel_ids: List[int] = None,
        currency: str = None,
        user_platform: HotelAvailabilityInputDtoUserPlatform = None,
        rows: int = None,
        page: str = None,
    ):
        self.checkin = checkin
        self.checkout = checkout
        if hotel_ids is not None:
            self.hotel_ids = hotel_ids
        if currency is not None:
            self.currency = currency
        self.guest_country = guest_country
        self.no_rooms = no_rooms
        if user_platform is not None:
            self.user_platform = self._enum_matching(
                user_platform,
                HotelAvailabilityInputDtoUserPlatform.list(),
                "user_platform",
            )
        if rows is not None:
            self.rows = rows
        if page is not None:
            self.page = page
