# -*- coding: utf-8 -*-

"""
    apimaticcalculatorlatest

    This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
"""


class RequestToBookCancelRequestModel(object):

    """Implementation of the 'RequestToBookCancelRequestModel' model.

    Model for request to book cancel API request

    Attributes:
        action (string): RESERVATION_REQUEST_VOIDED
        reservation_id (int): ID of reservation in BookingPal

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "action":'action',
        "reservation_id":'reservationId'
    }

    def __init__(self,
                 action=None,
                 reservation_id=None):
        """Constructor for the RequestToBookCancelRequestModel class"""

        # Initialize members of the class
        self.action = action
        self.reservation_id = reservation_id


    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object as
            obtained from the deserialization of the server's response. The keys
            MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if dictionary is None:
            return None

        # Extract variables from the dictionary
        action = dictionary.get('action')
        reservation_id = dictionary.get('reservationId')

        # Return an object of this model
        return cls(action,
                   reservation_id)


