# coding: utf-8

"""
    Selling Partner API for Listings Items

    The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).  # noqa: E501

    OpenAPI spec version: 2021-08-01
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from src.api_models.listings_api.swagger_client.configuration import Configuration


class ItemImage(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'link': 'str',
        'height': 'int',
        'width': 'int'
    }

    attribute_map = {
        'link': 'link',
        'height': 'height',
        'width': 'width'
    }

    def __init__(self, link=None, height=None, width=None, _configuration=None):  # noqa: E501
        """ItemImage - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._link = None
        self._height = None
        self._width = None
        self.discriminator = None

        self.link = link
        self.height = height
        self.width = width

    @property
    def link(self):
        """Gets the link of this ItemImage.  # noqa: E501

        Link, or URL, for the image.  # noqa: E501

        :return: The link of this ItemImage.  # noqa: E501
        :rtype: str
        """
        return self._link

    @link.setter
    def link(self, link):
        """Sets the link of this ItemImage.

        Link, or URL, for the image.  # noqa: E501

        :param link: The link of this ItemImage.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and link is None:
            raise ValueError("Invalid value for `link`, must not be `None`")  # noqa: E501

        self._link = link

    @property
    def height(self):
        """Gets the height of this ItemImage.  # noqa: E501

        Height of the image in pixels.  # noqa: E501

        :return: The height of this ItemImage.  # noqa: E501
        :rtype: int
        """
        return self._height

    @height.setter
    def height(self, height):
        """Sets the height of this ItemImage.

        Height of the image in pixels.  # noqa: E501

        :param height: The height of this ItemImage.  # noqa: E501
        :type: int
        """
        if self._configuration.client_side_validation and height is None:
            raise ValueError("Invalid value for `height`, must not be `None`")  # noqa: E501

        self._height = height

    @property
    def width(self):
        """Gets the width of this ItemImage.  # noqa: E501

        Width of the image in pixels.  # noqa: E501

        :return: The width of this ItemImage.  # noqa: E501
        :rtype: int
        """
        return self._width

    @width.setter
    def width(self, width):
        """Sets the width of this ItemImage.

        Width of the image in pixels.  # noqa: E501

        :param width: The width of this ItemImage.  # noqa: E501
        :type: int
        """
        if self._configuration.client_side_validation and width is None:
            raise ValueError("Invalid value for `width`, must not be `None`")  # noqa: E501

        self._width = width

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(ItemImage, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ItemImage):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ItemImage):
            return True

        return self.to_dict() != other.to_dict()
