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

"""
billbeeapi

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


class BillbeeInterfacesBillbeeAPIModelArticleImageRelationApiModel(object):

    """Implementation of the 'Billbee.Interfaces.BillbeeAPI.Model.ArticleImageRelationApiModel' model.

    TODO: type model description here.

    Attributes:
        url (string): TODO: type description here.
        id (long|int): TODO: type description here.
        thumb_path_ext (string): TODO: type description here.
        thumb_url (string): TODO: type description here.
        position (int): TODO: type description here.
        is_default (bool): TODO: type description here.
        article_id (long|int): TODO: type description here.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "url": 'Url',
        "id": 'Id',
        "thumb_path_ext": 'ThumbPathExt',
        "thumb_url": 'ThumbUrl',
        "position": 'Position',
        "is_default": 'IsDefault',
        "article_id": 'ArticleId'
    }

    def __init__(self,
                 url=None,
                 id=None,
                 thumb_path_ext=None,
                 thumb_url=None,
                 position=None,
                 is_default=None,
                 article_id=None):
        """Constructor for the BillbeeInterfacesBillbeeAPIModelArticleImageRelationApiModel class"""

        # Initialize members of the class
        self.url = url
        self.id = id
        self.thumb_path_ext = thumb_path_ext
        self.thumb_url = thumb_url
        self.position = position
        self.is_default = is_default
        self.article_id = article_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
        url = dictionary.get('Url')
        id = dictionary.get('Id')
        thumb_path_ext = dictionary.get('ThumbPathExt')
        thumb_url = dictionary.get('ThumbUrl')
        position = dictionary.get('Position')
        is_default = dictionary.get('IsDefault')
        article_id = dictionary.get('ArticleId')

        # Return an object of this model
        return cls(url,
                   id,
                   thumb_path_ext,
                   thumb_url,
                   position,
                   is_default,
                   article_id)
