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

"""
    apimaticcalculatorlatest

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


class PushNotificationLinksModel(object):

    """Implementation of the 'PushNotificationLinksModel' model.

    Model for push notification links

    Attributes:
        book_link (string): Link for getting notifications about new
            reservations
        cancel_link (string): Link for getting notification about cancel
            reservation
        async_push (string): Link for push data for async messages
        request_to_book (string): Link for request to book for AirBnb

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "book_link":'bookLink',
        "cancel_link":'cancelLink',
        "async_push":'asyncPush',
        "request_to_book":'requestToBook'
    }

    def __init__(self,
                 book_link=None,
                 cancel_link=None,
                 async_push=None,
                 request_to_book=None):
        """Constructor for the PushNotificationLinksModel class"""

        # Initialize members of the class
        self.book_link = book_link
        self.cancel_link = cancel_link
        self.async_push = async_push
        self.request_to_book = request_to_book


    @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
        book_link = dictionary.get('bookLink')
        cancel_link = dictionary.get('cancelLink')
        async_push = dictionary.get('asyncPush')
        request_to_book = dictionary.get('requestToBook')

        # Return an object of this model
        return cls(book_link,
                   cancel_link,
                   async_push,
                   request_to_book)


