# coding: utf-8

"""
    Selling Partner API for Catalog Items

    Use the Selling Partner API for Catalog Items to retrieve information about items in the Amazon catalog.  For more information, refer to the [Catalog Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/:catalog-items-api-v2022-04-01-use-case-guide).

    The version of the OpenAPI document: 2022-04-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class Item(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 = {
        'asin': 'str',
        'attributes': 'Dict[str, object]',
        'classifications': 'List[ItemBrowseClassificationsByMarketplace]',
        'dimensions': 'List[ItemDimensionsByMarketplace]',
        'identifiers': 'List[ItemIdentifiersByMarketplace]',
        'images': 'List[ItemImagesByMarketplace]',
        'product_types': 'List[ItemProductTypeByMarketplace]',
        'relationships': 'List[ItemRelationshipsByMarketplace]',
        'sales_ranks': 'List[ItemSalesRanksByMarketplace]',
        'summaries': 'List[ItemSummaryByMarketplace]',
        'vendor_details': 'List[ItemVendorDetailsByMarketplace]',
    }

    attribute_map = {
        'asin': 'asin',
        'attributes': 'attributes',
        'classifications': 'classifications',
        'dimensions': 'dimensions',
        'identifiers': 'identifiers',
        'images': 'images',
        'product_types': 'productTypes',
        'relationships': 'relationships',
        'sales_ranks': 'salesRanks',
        'summaries': 'summaries',
        'vendor_details': 'vendorDetails',
    }

    def __init__(self, asin=None, attributes=None, classifications=None, dimensions=None, identifiers=None, images=None, product_types=None, relationships=None, sales_ranks=None, summaries=None, vendor_details=None, _configuration=None):  # noqa: E501
        """Item - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._asin = None
        self._attributes = None
        self._classifications = None
        self._dimensions = None
        self._identifiers = None
        self._images = None
        self._product_types = None
        self._relationships = None
        self._sales_ranks = None
        self._summaries = None
        self._vendor_details = None
        self.discriminator = None

        self.asin = asin
        if attributes is not None:
            self.attributes = attributes
        if classifications is not None:
            self.classifications = classifications
        if dimensions is not None:
            self.dimensions = dimensions
        if identifiers is not None:
            self.identifiers = identifiers
        if images is not None:
            self.images = images
        if product_types is not None:
            self.product_types = product_types
        if relationships is not None:
            self.relationships = relationships
        if sales_ranks is not None:
            self.sales_ranks = sales_ranks
        if summaries is not None:
            self.summaries = summaries
        if vendor_details is not None:
            self.vendor_details = vendor_details

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

        The unique identifier of an item in the Amazon catalog.  # noqa: E501

        :return: The asin of this Item.  # noqa: E501
        :rtype: str
        """
        return self._asin

    @asin.setter
    def asin(self, asin):
        """Sets the asin of this Item.

        The unique identifier of an item in the Amazon catalog.  # noqa: E501

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

        self._asin = asin

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

        A JSON object containing structured item attribute data that is keyed by attribute name. Catalog item attributes conform to the related Amazon product type definitions that you can get from the [Product Type Definitions API](https://developer-docs.amazon.com/sp-api/docs/product-type-definitions-api-v2020-09-01-reference).  # noqa: E501

        :return: The attributes of this Item.  # noqa: E501
        :rtype: Dict[str, object]
        """
        return self._attributes

    @attributes.setter
    def attributes(self, attributes):
        """Sets the attributes of this Item.

        A JSON object containing structured item attribute data that is keyed by attribute name. Catalog item attributes conform to the related Amazon product type definitions that you can get from the [Product Type Definitions API](https://developer-docs.amazon.com/sp-api/docs/product-type-definitions-api-v2020-09-01-reference).  # noqa: E501

        :param attributes: The attributes of this Item.  # noqa: E501
        :type: Dict[str, object]
        """

        self._attributes = attributes

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

        An array of classifications (browse nodes) that is associated with the item in the Amazon catalog, grouped by `marketplaceId`.  # noqa: E501

        :return: The classifications of this Item.  # noqa: E501
        :rtype: List[ItemBrowseClassificationsByMarketplace]
        """
        return self._classifications

    @classifications.setter
    def classifications(self, classifications):
        """Sets the classifications of this Item.

        An array of classifications (browse nodes) that is associated with the item in the Amazon catalog, grouped by `marketplaceId`.  # noqa: E501

        :param classifications: The classifications of this Item.  # noqa: E501
        :type: List[ItemBrowseClassificationsByMarketplace]
        """

        self._classifications = classifications

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

        An array of dimensions that are associated with the item in the Amazon catalog, grouped by `marketplaceId`.  # noqa: E501

        :return: The dimensions of this Item.  # noqa: E501
        :rtype: List[ItemDimensionsByMarketplace]
        """
        return self._dimensions

    @dimensions.setter
    def dimensions(self, dimensions):
        """Sets the dimensions of this Item.

        An array of dimensions that are associated with the item in the Amazon catalog, grouped by `marketplaceId`.  # noqa: E501

        :param dimensions: The dimensions of this Item.  # noqa: E501
        :type: List[ItemDimensionsByMarketplace]
        """

        self._dimensions = dimensions

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

        Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.  # noqa: E501

        :return: The identifiers of this Item.  # noqa: E501
        :rtype: List[ItemIdentifiersByMarketplace]
        """
        return self._identifiers

    @identifiers.setter
    def identifiers(self, identifiers):
        """Sets the identifiers of this Item.

        Identifiers associated with the item in the Amazon catalog, such as UPC and EAN identifiers.  # noqa: E501

        :param identifiers: The identifiers of this Item.  # noqa: E501
        :type: List[ItemIdentifiersByMarketplace]
        """

        self._identifiers = identifiers

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

        The images for an item in the Amazon catalog.  # noqa: E501

        :return: The images of this Item.  # noqa: E501
        :rtype: List[ItemImagesByMarketplace]
        """
        return self._images

    @images.setter
    def images(self, images):
        """Sets the images of this Item.

        The images for an item in the Amazon catalog.  # noqa: E501

        :param images: The images of this Item.  # noqa: E501
        :type: List[ItemImagesByMarketplace]
        """

        self._images = images

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

        Product types that are associated with the Amazon catalog item.  # noqa: E501

        :return: The product_types of this Item.  # noqa: E501
        :rtype: List[ItemProductTypeByMarketplace]
        """
        return self._product_types

    @product_types.setter
    def product_types(self, product_types):
        """Sets the product_types of this Item.

        Product types that are associated with the Amazon catalog item.  # noqa: E501

        :param product_types: The product_types of this Item.  # noqa: E501
        :type: List[ItemProductTypeByMarketplace]
        """

        self._product_types = product_types

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

        Relationships grouped by `marketplaceId` for an Amazon catalog item (for example, variations).  # noqa: E501

        :return: The relationships of this Item.  # noqa: E501
        :rtype: List[ItemRelationshipsByMarketplace]
        """
        return self._relationships

    @relationships.setter
    def relationships(self, relationships):
        """Sets the relationships of this Item.

        Relationships grouped by `marketplaceId` for an Amazon catalog item (for example, variations).  # noqa: E501

        :param relationships: The relationships of this Item.  # noqa: E501
        :type: List[ItemRelationshipsByMarketplace]
        """

        self._relationships = relationships

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

        Sales ranks of an Amazon catalog item.  # noqa: E501

        :return: The sales_ranks of this Item.  # noqa: E501
        :rtype: List[ItemSalesRanksByMarketplace]
        """
        return self._sales_ranks

    @sales_ranks.setter
    def sales_ranks(self, sales_ranks):
        """Sets the sales_ranks of this Item.

        Sales ranks of an Amazon catalog item.  # noqa: E501

        :param sales_ranks: The sales_ranks of this Item.  # noqa: E501
        :type: List[ItemSalesRanksByMarketplace]
        """

        self._sales_ranks = sales_ranks

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

        Summaries of Amazon catalog items.  # noqa: E501

        :return: The summaries of this Item.  # noqa: E501
        :rtype: List[ItemSummaryByMarketplace]
        """
        return self._summaries

    @summaries.setter
    def summaries(self, summaries):
        """Sets the summaries of this Item.

        Summaries of Amazon catalog items.  # noqa: E501

        :param summaries: The summaries of this Item.  # noqa: E501
        :type: List[ItemSummaryByMarketplace]
        """

        self._summaries = summaries

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

        The vendor details that are associated with an Amazon catalog item. Vendor details are only available to vendors.  # noqa: E501

        :return: The vendor_details of this Item.  # noqa: E501
        :rtype: List[ItemVendorDetailsByMarketplace]
        """
        return self._vendor_details

    @vendor_details.setter
    def vendor_details(self, vendor_details):
        """Sets the vendor_details of this Item.

        The vendor details that are associated with an Amazon catalog item. Vendor details are only available to vendors.  # noqa: E501

        :param vendor_details: The vendor_details of this Item.  # noqa: E501
        :type: List[ItemVendorDetailsByMarketplace]
        """

        self._vendor_details = vendor_details

    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(Item, 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, Item):
            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, Item):
            return True

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