# 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](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).

    The version of the OpenAPI document: 2021-08-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 = {
        'sku': 'str',
        'summaries': 'List[ItemSummaryByMarketplace]',
        'attributes': 'Dict[str, object]',
        'issues': 'List[Issue]',
        'offers': 'List[ItemOfferByMarketplace]',
        'fulfillment_availability': 'List[FulfillmentAvailability]',
        'procurement': 'List[ItemProcurement]',
        'relationships': 'List[ItemRelationshipsByMarketplace]',
        'product_types': 'List[ItemProductTypeByMarketplace]',
    }

    attribute_map = {
        'sku': 'sku',
        'summaries': 'summaries',
        'attributes': 'attributes',
        'issues': 'issues',
        'offers': 'offers',
        'fulfillment_availability': 'fulfillmentAvailability',
        'procurement': 'procurement',
        'relationships': 'relationships',
        'product_types': 'productTypes',
    }

    def __init__(self, sku=None, summaries=None, attributes=None, issues=None, offers=None, fulfillment_availability=None, procurement=None, relationships=None, product_types=None, _configuration=None):  # noqa: E501
        """Item - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._sku = None
        self._summaries = None
        self._attributes = None
        self._issues = None
        self._offers = None
        self._fulfillment_availability = None
        self._procurement = None
        self._relationships = None
        self._product_types = None
        self.discriminator = None

        self.sku = sku
        if summaries is not None:
            self.summaries = summaries
        if attributes is not None:
            self.attributes = attributes
        if issues is not None:
            self.issues = issues
        if offers is not None:
            self.offers = offers
        if fulfillment_availability is not None:
            self.fulfillment_availability = fulfillment_availability
        if procurement is not None:
            self.procurement = procurement
        if relationships is not None:
            self.relationships = relationships
        if product_types is not None:
            self.product_types = product_types

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

        A selling partner provided identifier for an Amazon listing.  # noqa: E501

        :return: The sku of this Item.  # noqa: E501
        :rtype: str
        """
        return self._sku

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

        A selling partner provided identifier for an Amazon listing.  # noqa: E501

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

        self._sku = sku

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

        Summary details of a listings item.  # 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.

        Summary details of a listings item.  # noqa: E501

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

        self._summaries = summaries

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

        A JSON object containing structured listings item attribute data keyed by attribute name.  # 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 listings item attribute data keyed by attribute name.  # noqa: E501

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

        self._attributes = attributes

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

        The issues associated with the listings item.  # noqa: E501

        :return: The issues of this Item.  # noqa: E501
        :rtype: List[Issue]
        """
        return self._issues

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

        The issues associated with the listings item.  # noqa: E501

        :param issues: The issues of this Item.  # noqa: E501
        :type: List[Issue]
        """

        self._issues = issues

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

        Offer details for the listings item.  # noqa: E501

        :return: The offers of this Item.  # noqa: E501
        :rtype: List[ItemOfferByMarketplace]
        """
        return self._offers

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

        Offer details for the listings item.  # noqa: E501

        :param offers: The offers of this Item.  # noqa: E501
        :type: List[ItemOfferByMarketplace]
        """

        self._offers = offers

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

        The fulfillment availability for the listings item.  # noqa: E501

        :return: The fulfillment_availability of this Item.  # noqa: E501
        :rtype: List[FulfillmentAvailability]
        """
        return self._fulfillment_availability

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

        The fulfillment availability for the listings item.  # noqa: E501

        :param fulfillment_availability: The fulfillment_availability of this Item.  # noqa: E501
        :type: List[FulfillmentAvailability]
        """

        self._fulfillment_availability = fulfillment_availability

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

        The vendor procurement information for the listings item.  # noqa: E501

        :return: The procurement of this Item.  # noqa: E501
        :rtype: List[ItemProcurement]
        """
        return self._procurement

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

        The vendor procurement information for the listings item.  # noqa: E501

        :param procurement: The procurement of this Item.  # noqa: E501
        :type: List[ItemProcurement]
        """

        self._procurement = procurement

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

        Relationships for a listing item, by marketplace (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 for a listing item, by marketplace (for example, variations).  # noqa: E501

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

        self._relationships = relationships

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

        Product types for a listing item, by marketplace.  # 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 for a listing item, by marketplace.  # noqa: E501

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

        self._product_types = product_types

    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()
