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

from __future__ import annotations
from enum import Enum
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .booker_input_dto import BookerInputDto
from .guests_input_dto import GuestsInputDto
from .coordinates import Coordinates


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

    :cvar EXTRA_CHARGES: "EXTRA_CHARGES"
    :vartype EXTRA_CHARGES: str
    :cvar PRODUCTS: "PRODUCTS"
    :vartype PRODUCTS: str
    """

    EXTRA_CHARGES = "EXTRA_CHARGES"
    PRODUCTS = "PRODUCTS"

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

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


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

    :param checkin: The checkin date. Must be within 500 days in the future and in the format yyyy-mm-dd.
    :type checkin: str
    :param checkout: The checkout date. Must be later than {checkin}. Must be between 1 and 90 days after {checkin}. Must be within 500 days in the future and in the format yyyy-mm-dd.
    :type checkout: str
    :param booker: The booker's information.
    :type booker: BookerInputDto
    :param currency: A three-letter code that uniquely identifies a monetary currency as defined by the ISO 4217 standard., defaults to None
    :type currency: str, optional
    :param city: A signed integer number that uniquely identifies a city. , defaults to None
    :type city: int, optional
    :param country: A two-letter code that uniquely identifies a country. This code is defined by the ISO 3166-1 alpha-2 standard (ISO2) as described here: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2. , defaults to None
    :type country: str, optional
    :param guests: The guest details for the request.
    :type guests: GuestsInputDto
    :param extras: Input parameter to request for additional information about the products., defaults to None
    :type extras: List[SearchInputDtoExtras], optional
    :param accommodations: A signed integer number that uniquely identifies an accommodation property., defaults to None
    :type accommodations: List[int], optional
    :param accommodation_facilities: A signed integer number that uniquely identifies an accommodation facility., defaults to None
    :type accommodation_facilities: List[int], optional
    :param room_facilities: A signed integer number that uniquely identifies a room facility., defaults to None
    :type room_facilities: List[int], optional
    :param accommodation_types: A signed integer number that uniquely identifies an accommodation type., defaults to None
    :type accommodation_types: List[int], optional
    :param brands: A signed integer number that uniquely identifies a brand., defaults to None
    :type brands: List[int], optional
    :param airport: A three-letter code that uniquely identifies an airport as defined by the International Air Transport Association (IATA)., defaults to None
    :type airport: str, optional
    :param district: A signed integer number that uniquely identifies a district. Typically, districts define known areas within a city., defaults to None
    :type district: int, optional
    :param landmark: A signed integer number that uniquely identifies a relevant geographical landmark, like a monument or a natural attraction., defaults to None
    :type landmark: int, optional
    :param coordinates: Limit the result list to the specified coordinates., defaults to None
    :type coordinates: Coordinates, optional
    :param region: A signed integer number that uniquely identifies a geographical region. Regions usually define official administrative areas within a country, but may also include multiple countries and in some cases un-official but popular designations for geographical areas. An example of a region that crosses multiple countries is the Alps in Europe. , defaults to None
    :type region: int, 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,
        booker: BookerInputDto,
        guests: GuestsInputDto,
        currency: str = None,
        city: int = None,
        country: str = None,
        extras: List[SearchInputDtoExtras] = None,
        accommodations: List[int] = None,
        accommodation_facilities: List[int] = None,
        room_facilities: List[int] = None,
        accommodation_types: List[int] = None,
        brands: List[int] = None,
        airport: str = None,
        district: int = None,
        landmark: int = None,
        coordinates: Coordinates = None,
        region: int = None,
        rows: int = None,
        page: str = None,
    ):
        self.checkin = checkin
        self.checkout = checkout
        self.booker = self._define_object(booker, BookerInputDto)
        if currency is not None:
            self.currency = self._pattern_matching(currency, "^[A-Z]{3}$", "currency")
        if city is not None:
            self.city = city
        if country is not None:
            self.country = self._pattern_matching(country, "^[a-z]{2}$", "country")
        self.guests = self._define_object(guests, GuestsInputDto)
        if extras is not None:
            self.extras = self._define_list(extras, SearchInputDtoExtras)
        if accommodations is not None:
            self.accommodations = accommodations
        if accommodation_facilities is not None:
            self.accommodation_facilities = accommodation_facilities
        if room_facilities is not None:
            self.room_facilities = room_facilities
        if accommodation_types is not None:
            self.accommodation_types = accommodation_types
        if brands is not None:
            self.brands = brands
        if airport is not None:
            self.airport = self._pattern_matching(airport, "^[A-Z]{3}$", "airport")
        if district is not None:
            self.district = district
        if landmark is not None:
            self.landmark = landmark
        if coordinates is not None:
            self.coordinates = self._define_object(coordinates, Coordinates)
        if region is not None:
            self.region = region
        if rows is not None:
            self.rows = rows
        if page is not None:
            self.page = page
