# 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 InventoryUpdate(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 = {
        'selling_party': 'PartyIdentification',
        'is_full_update': 'bool',
        'items': 'List[ItemDetails]',
    }

    attribute_map = {
        'selling_party': 'sellingParty',
        'is_full_update': 'isFullUpdate',
        'items': 'items',
    }

    def __init__(self, selling_party=None, is_full_update=None, items=None, _configuration=None):  # noqa: E501
        """InventoryUpdate - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._selling_party = None
        self._is_full_update = None
        self._items = None
        self.discriminator = None

        self.selling_party = selling_party
        self.is_full_update = is_full_update
        self.items = items

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


        :return: The selling_party of this InventoryUpdate.  # noqa: E501
        :rtype: PartyIdentification
        """
        return self._selling_party

    @selling_party.setter
    def selling_party(self, selling_party):
        """Sets the selling_party of this InventoryUpdate.


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

        self._selling_party = selling_party

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

        When true, this request contains a full feed. Otherwise, this request contains a partial feed. When sending a full feed, you must send information about all items in the warehouse. Any items not in the full feed are updated as not available. When sending a partial feed, only include the items that need an update to inventory. The status of other items will remain unchanged.  # noqa: E501

        :return: The is_full_update of this InventoryUpdate.  # noqa: E501
        :rtype: bool
        """
        return self._is_full_update

    @is_full_update.setter
    def is_full_update(self, is_full_update):
        """Sets the is_full_update of this InventoryUpdate.

        When true, this request contains a full feed. Otherwise, this request contains a partial feed. When sending a full feed, you must send information about all items in the warehouse. Any items not in the full feed are updated as not available. When sending a partial feed, only include the items that need an update to inventory. The status of other items will remain unchanged.  # noqa: E501

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

        self._is_full_update = is_full_update

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

        A list of inventory items with updated details, including quantity available.  # noqa: E501

        :return: The items of this InventoryUpdate.  # noqa: E501
        :rtype: List[ItemDetails]
        """
        return self._items

    @items.setter
    def items(self, items):
        """Sets the items of this InventoryUpdate.

        A list of inventory items with updated details, including quantity available.  # noqa: E501

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

        self._items = items

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

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