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

"""
    apimaticcalculatorlatest

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


class Image(object):

    """Implementation of the 'Image' model.

    TODO: type model description here.

    Attributes:
        url (string): URL of the image
        tags (list of ImageTagsEnum): imagesText of main description. Tags
            codes are given in Appendix.
        url_mbp (string): URL of the image on MyBookingPal. This field will be
            only in response. You can not send this in request.
        sort (int): Sort of the image. Image with the lowest sort number will
            be set as main. This field will be only in response. You can not
            send this in request.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "url":'url',
        "tags":'tags',
        "url_mbp":'urlMbp',
        "sort":'sort'
    }

    def __init__(self,
                 url=None,
                 tags=None,
                 url_mbp=None,
                 sort=None):
        """Constructor for the Image class"""

        # Initialize members of the class
        self.url = url
        self.tags = tags
        self.url_mbp = url_mbp
        self.sort = sort


    @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
        url = dictionary.get('url')
        tags = dictionary.get('tags')
        url_mbp = dictionary.get('urlMbp')
        sort = dictionary.get('sort')

        # Return an object of this model
        return cls(url,
                   tags,
                   url_mbp,
                   sort)


