# coding: utf-8

"""
    The Selling Partner API for Amazon Warehousing and Distribution

    The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.

    The version of the OpenAPI document: 2024-05-09
    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 ProductQuantity(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 = {
        'attributes': 'List[ProductAttribute]',
        'quantity': 'int',
        'sku': 'str',
        'expiration': 'datetime',
        'prep_details': 'PrepDetails',
    }

    attribute_map = {
        'attributes': 'attributes',
        'quantity': 'quantity',
        'sku': 'sku',
        'expiration': 'expiration',
        'prep_details': 'prepDetails',
    }

    def __init__(self, attributes=None, quantity=None, sku=None, expiration=None, prep_details=None, _configuration=None):  # noqa: E501
        """ProductQuantity - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._attributes = None
        self._quantity = None
        self._sku = None
        self._expiration = None
        self._prep_details = None
        self.discriminator = None

        if attributes is not None:
            self.attributes = attributes
        self.quantity = quantity
        self.sku = sku
        if expiration is not None:
            self.expiration = expiration
        if prep_details is not None:
            self.prep_details = prep_details

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

        Contains attributes for this instance of the product. For example, item color, or other attributes that distinguish the product beyond the SKU. This is metadata for the product and Amazon does not process this data.  # noqa: E501

        :return: The attributes of this ProductQuantity.  # noqa: E501
        :rtype: List[ProductAttribute]
        """
        return self._attributes

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

        Contains attributes for this instance of the product. For example, item color, or other attributes that distinguish the product beyond the SKU. This is metadata for the product and Amazon does not process this data.  # noqa: E501

        :param attributes: The attributes of this ProductQuantity.  # noqa: E501
        :type: List[ProductAttribute]
        """

        self._attributes = attributes

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

        Product quantity.  # noqa: E501

        :return: The quantity of this ProductQuantity.  # noqa: E501
        :rtype: int
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this ProductQuantity.

        Product quantity.  # noqa: E501

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

        self._quantity = quantity

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

        The seller or merchant SKU.  # noqa: E501

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

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

        The seller or merchant SKU.  # noqa: E501

        :param sku: The sku of this ProductQuantity.  # 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 expiration(self):
        """Gets the expiration of this ProductQuantity.  # noqa: E501

        The expiration date for the SKU. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.  # noqa: E501

        :return: The expiration of this ProductQuantity.  # noqa: E501
        :rtype: datetime
        """
        return self._expiration

    @expiration.setter
    def expiration(self, expiration):
        """Sets the expiration of this ProductQuantity.

        The expiration date for the SKU. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.  # noqa: E501

        :param expiration: The expiration of this ProductQuantity.  # noqa: E501
        :type: datetime
        """

        self._expiration = expiration

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


        :return: The prep_details of this ProductQuantity.  # noqa: E501
        :rtype: PrepDetails
        """
        return self._prep_details

    @prep_details.setter
    def prep_details(self, prep_details):
        """Sets the prep_details of this ProductQuantity.


        :param prep_details: The prep_details of this ProductQuantity.  # noqa: E501
        :type: PrepDetails
        """

        self._prep_details = prep_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(ProductQuantity, 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, ProductQuantity):
            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, ProductQuantity):
            return True

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