# coding: utf-8

"""
    Selling Partner API for Pricing

    The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

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


class Product(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 = {
        'identifiers': 'IdentifierType',
        'attribute_sets': 'AttributeSetList',
        'relationships': 'RelationshipList',
        'competitive_pricing': 'CompetitivePricingType',
        'sales_rankings': 'SalesRankList',
        'offers': 'OffersList'
    }

    attribute_map = {
        'identifiers': 'Identifiers',
        'attribute_sets': 'AttributeSets',
        'relationships': 'Relationships',
        'competitive_pricing': 'CompetitivePricing',
        'sales_rankings': 'SalesRankings',
        'offers': 'Offers'
    }

    def __init__(self, identifiers=None, attribute_sets=None, relationships=None, competitive_pricing=None, sales_rankings=None, offers=None, _configuration=None):  # noqa: E501
        """Product - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._identifiers = None
        self._attribute_sets = None
        self._relationships = None
        self._competitive_pricing = None
        self._sales_rankings = None
        self._offers = None
        self.discriminator = None

        self.identifiers = identifiers
        if attribute_sets is not None:
            self.attribute_sets = attribute_sets
        if relationships is not None:
            self.relationships = relationships
        if competitive_pricing is not None:
            self.competitive_pricing = competitive_pricing
        if sales_rankings is not None:
            self.sales_rankings = sales_rankings
        if offers is not None:
            self.offers = offers

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


        :return: The identifiers of this Product.  # noqa: E501
        :rtype: IdentifierType
        """
        return self._identifiers

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


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

        self._identifiers = identifiers

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


        :return: The attribute_sets of this Product.  # noqa: E501
        :rtype: AttributeSetList
        """
        return self._attribute_sets

    @attribute_sets.setter
    def attribute_sets(self, attribute_sets):
        """Sets the attribute_sets of this Product.


        :param attribute_sets: The attribute_sets of this Product.  # noqa: E501
        :type: AttributeSetList
        """

        self._attribute_sets = attribute_sets

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


        :return: The relationships of this Product.  # noqa: E501
        :rtype: RelationshipList
        """
        return self._relationships

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


        :param relationships: The relationships of this Product.  # noqa: E501
        :type: RelationshipList
        """

        self._relationships = relationships

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


        :return: The competitive_pricing of this Product.  # noqa: E501
        :rtype: CompetitivePricingType
        """
        return self._competitive_pricing

    @competitive_pricing.setter
    def competitive_pricing(self, competitive_pricing):
        """Sets the competitive_pricing of this Product.


        :param competitive_pricing: The competitive_pricing of this Product.  # noqa: E501
        :type: CompetitivePricingType
        """

        self._competitive_pricing = competitive_pricing

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


        :return: The sales_rankings of this Product.  # noqa: E501
        :rtype: SalesRankList
        """
        return self._sales_rankings

    @sales_rankings.setter
    def sales_rankings(self, sales_rankings):
        """Sets the sales_rankings of this Product.


        :param sales_rankings: The sales_rankings of this Product.  # noqa: E501
        :type: SalesRankList
        """

        self._sales_rankings = sales_rankings

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


        :return: The offers of this Product.  # noqa: E501
        :rtype: OffersList
        """
        return self._offers

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


        :param offers: The offers of this Product.  # noqa: E501
        :type: OffersList
        """

        self._offers = offers

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

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