# coding: utf-8

"""
    Selling Partner API for Direct Fulfillment Inventory Updates

    The Selling Partner API for Direct Fulfillment Inventory Updates provides programmatic access to a direct fulfillment vendor's inventory updates.

    The version of the OpenAPI document: v1
    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 ItemDetails(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 = {
        'buyer_product_identifier': 'str',
        'vendor_product_identifier': 'str',
        'available_quantity': 'ItemQuantity',
        'is_obsolete': 'bool',
    }

    attribute_map = {
        'buyer_product_identifier': 'buyerProductIdentifier',
        'vendor_product_identifier': 'vendorProductIdentifier',
        'available_quantity': 'availableQuantity',
        'is_obsolete': 'isObsolete',
    }

    def __init__(self, buyer_product_identifier=None, vendor_product_identifier=None, available_quantity=None, is_obsolete=None, _configuration=None):  # noqa: E501
        """ItemDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._buyer_product_identifier = None
        self._vendor_product_identifier = None
        self._available_quantity = None
        self._is_obsolete = None
        self.discriminator = None

        if buyer_product_identifier is not None:
            self.buyer_product_identifier = buyer_product_identifier
        if vendor_product_identifier is not None:
            self.vendor_product_identifier = vendor_product_identifier
        self.available_quantity = available_quantity
        if is_obsolete is not None:
            self.is_obsolete = is_obsolete

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

        The buyer selected product identification of the item. Either buyerProductIdentifier or vendorProductIdentifier should be submitted.  # noqa: E501

        :return: The buyer_product_identifier of this ItemDetails.  # noqa: E501
        :rtype: str
        """
        return self._buyer_product_identifier

    @buyer_product_identifier.setter
    def buyer_product_identifier(self, buyer_product_identifier):
        """Sets the buyer_product_identifier of this ItemDetails.

        The buyer selected product identification of the item. Either buyerProductIdentifier or vendorProductIdentifier should be submitted.  # noqa: E501

        :param buyer_product_identifier: The buyer_product_identifier of this ItemDetails.  # noqa: E501
        :type: str
        """

        self._buyer_product_identifier = buyer_product_identifier

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

        The vendor selected product identification of the item. Either buyerProductIdentifier or vendorProductIdentifier should be submitted.  # noqa: E501

        :return: The vendor_product_identifier of this ItemDetails.  # noqa: E501
        :rtype: str
        """
        return self._vendor_product_identifier

    @vendor_product_identifier.setter
    def vendor_product_identifier(self, vendor_product_identifier):
        """Sets the vendor_product_identifier of this ItemDetails.

        The vendor selected product identification of the item. Either buyerProductIdentifier or vendorProductIdentifier should be submitted.  # noqa: E501

        :param vendor_product_identifier: The vendor_product_identifier of this ItemDetails.  # noqa: E501
        :type: str
        """

        self._vendor_product_identifier = vendor_product_identifier

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


        :return: The available_quantity of this ItemDetails.  # noqa: E501
        :rtype: ItemQuantity
        """
        return self._available_quantity

    @available_quantity.setter
    def available_quantity(self, available_quantity):
        """Sets the available_quantity of this ItemDetails.


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

        self._available_quantity = available_quantity

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

        When true, the item is permanently unavailable.  # noqa: E501

        :return: The is_obsolete of this ItemDetails.  # noqa: E501
        :rtype: bool
        """
        return self._is_obsolete

    @is_obsolete.setter
    def is_obsolete(self, is_obsolete):
        """Sets the is_obsolete of this ItemDetails.

        When true, the item is permanently unavailable.  # noqa: E501

        :param is_obsolete: The is_obsolete of this ItemDetails.  # noqa: E501
        :type: bool
        """

        self._is_obsolete = is_obsolete

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

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