# 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 .block_output_dto import BlockOutputDto


@JsonMap({"is_flash_deal": "isFlashDeal"})
class BlockAvailabilityOutputDto(BaseModel):
    """BlockAvailabilityOutputDto

    :param block: The object containing all the relevant information for the combination of room, policy, meal and occupancy that determines the price." A block is the unique entity you book with booking.com., defaults to None
    :type block: List[BlockOutputDto], optional
    :param can_pay_now: Boolean value set to "true" if payment can be made during reservation process or "false" if it can not., defaults to None
    :type can_pay_now: bool, optional
    :param checkin: The date that was searched for as checkin. Format: YYYY-MM-DD, defaults to None
    :type checkin: str, optional
    :param checkout: The date that was searched for as checkout. Format: YYYY-MM-DD, defaults to None
    :type checkout: str, optional
    :param direct_payment: Boolean value set to "true" if the direct payment is available or "false" if it is not., defaults to None
    :type direct_payment: bool, optional
    :param hotel_id: Booking.com hotel ID. The unique identifier of this hotel., defaults to None
    :type hotel_id: int, optional
    :param hotel_url: URL of the hotel's page on Booking.com., defaults to None
    :type hotel_url: str, optional
    :param is_flash_deal: is_flash_deal, defaults to None
    :type is_flash_deal: bool, optional
    :param flash_deal: flash_deal, defaults to None
    :type flash_deal: bool, optional
    """

    def __init__(
        self,
        block: List[BlockOutputDto] = None,
        can_pay_now: bool = None,
        checkin: str = None,
        checkout: str = None,
        direct_payment: bool = None,
        hotel_id: int = None,
        hotel_url: str = None,
        is_flash_deal: bool = None,
        flash_deal: bool = None,
    ):
        if block is not None:
            self.block = self._define_list(block, BlockOutputDto)
        if can_pay_now is not None:
            self.can_pay_now = can_pay_now
        if checkin is not None:
            self.checkin = checkin
        if checkout is not None:
            self.checkout = checkout
        if direct_payment is not None:
            self.direct_payment = direct_payment
        if hotel_id is not None:
            self.hotel_id = hotel_id
        if hotel_url is not None:
            self.hotel_url = hotel_url
        if is_flash_deal is not None:
            self.is_flash_deal = is_flash_deal
        if flash_deal is not None:
            self.flash_deal = flash_deal
