# coding: utf-8

"""
    Selling Partner APIs for Fulfillment Outbound

    The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.

    The version of the OpenAPI document: 2020-07-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 UpdateFulfillmentOrderItem(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 = {
        'seller_sku': 'str',
        'seller_fulfillment_order_item_id': 'str',
        'quantity': 'int',
        'gift_message': 'str',
        'displayable_comment': 'str',
        'fulfillment_network_sku': 'str',
        'order_item_disposition': 'str',
        'per_unit_declared_value': 'Money',
        'per_unit_price': 'Money',
        'per_unit_tax': 'Money',
    }

    attribute_map = {
        'seller_sku': 'sellerSku',
        'seller_fulfillment_order_item_id': 'sellerFulfillmentOrderItemId',
        'quantity': 'quantity',
        'gift_message': 'giftMessage',
        'displayable_comment': 'displayableComment',
        'fulfillment_network_sku': 'fulfillmentNetworkSku',
        'order_item_disposition': 'orderItemDisposition',
        'per_unit_declared_value': 'perUnitDeclaredValue',
        'per_unit_price': 'perUnitPrice',
        'per_unit_tax': 'perUnitTax',
    }

    def __init__(self, seller_sku=None, seller_fulfillment_order_item_id=None, quantity=None, gift_message=None, displayable_comment=None, fulfillment_network_sku=None, order_item_disposition=None, per_unit_declared_value=None, per_unit_price=None, per_unit_tax=None, _configuration=None):  # noqa: E501
        """UpdateFulfillmentOrderItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._seller_sku = None
        self._seller_fulfillment_order_item_id = None
        self._quantity = None
        self._gift_message = None
        self._displayable_comment = None
        self._fulfillment_network_sku = None
        self._order_item_disposition = None
        self._per_unit_declared_value = None
        self._per_unit_price = None
        self._per_unit_tax = None
        self.discriminator = None

        if seller_sku is not None:
            self.seller_sku = seller_sku
        self.seller_fulfillment_order_item_id = seller_fulfillment_order_item_id
        self.quantity = quantity
        if gift_message is not None:
            self.gift_message = gift_message
        if displayable_comment is not None:
            self.displayable_comment = displayable_comment
        if fulfillment_network_sku is not None:
            self.fulfillment_network_sku = fulfillment_network_sku
        if order_item_disposition is not None:
            self.order_item_disposition = order_item_disposition
        if per_unit_declared_value is not None:
            self.per_unit_declared_value = per_unit_declared_value
        if per_unit_price is not None:
            self.per_unit_price = per_unit_price
        if per_unit_tax is not None:
            self.per_unit_tax = per_unit_tax

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

        The seller SKU of the item.  # noqa: E501

        :return: The seller_sku of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: str
        """
        return self._seller_sku

    @seller_sku.setter
    def seller_sku(self, seller_sku):
        """Sets the seller_sku of this UpdateFulfillmentOrderItem.

        The seller SKU of the item.  # noqa: E501

        :param seller_sku: The seller_sku of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: str
        """

        self._seller_sku = seller_sku

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

        Identifies the fulfillment order item to update. Created with a previous call to the `createFulfillmentOrder` operation.  # noqa: E501

        :return: The seller_fulfillment_order_item_id of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: str
        """
        return self._seller_fulfillment_order_item_id

    @seller_fulfillment_order_item_id.setter
    def seller_fulfillment_order_item_id(self, seller_fulfillment_order_item_id):
        """Sets the seller_fulfillment_order_item_id of this UpdateFulfillmentOrderItem.

        Identifies the fulfillment order item to update. Created with a previous call to the `createFulfillmentOrder` operation.  # noqa: E501

        :param seller_fulfillment_order_item_id: The seller_fulfillment_order_item_id of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and seller_fulfillment_order_item_id is None:
            raise ValueError("Invalid value for `seller_fulfillment_order_item_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                seller_fulfillment_order_item_id is not None and len(seller_fulfillment_order_item_id) > 50):
            raise ValueError("Invalid value for `seller_fulfillment_order_item_id`, length must be less than or equal to `50`")  # noqa: E501

        self._seller_fulfillment_order_item_id = seller_fulfillment_order_item_id

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

        The item quantity.  # noqa: E501

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

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

        The item quantity.  # noqa: E501

        :param quantity: The quantity of this UpdateFulfillmentOrderItem.  # 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 gift_message(self):
        """Gets the gift_message of this UpdateFulfillmentOrderItem.  # noqa: E501

        A message to the gift recipient, if applicable.  # noqa: E501

        :return: The gift_message of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: str
        """
        return self._gift_message

    @gift_message.setter
    def gift_message(self, gift_message):
        """Sets the gift_message of this UpdateFulfillmentOrderItem.

        A message to the gift recipient, if applicable.  # noqa: E501

        :param gift_message: The gift_message of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                gift_message is not None and len(gift_message) > 512):
            raise ValueError("Invalid value for `gift_message`, length must be less than or equal to `512`")  # noqa: E501

        self._gift_message = gift_message

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

        Item-specific text that displays in recipient-facing materials such as the outbound shipment packing slip.  # noqa: E501

        :return: The displayable_comment of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: str
        """
        return self._displayable_comment

    @displayable_comment.setter
    def displayable_comment(self, displayable_comment):
        """Sets the displayable_comment of this UpdateFulfillmentOrderItem.

        Item-specific text that displays in recipient-facing materials such as the outbound shipment packing slip.  # noqa: E501

        :param displayable_comment: The displayable_comment of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                displayable_comment is not None and len(displayable_comment) > 250):
            raise ValueError("Invalid value for `displayable_comment`, length must be less than or equal to `250`")  # noqa: E501

        self._displayable_comment = displayable_comment

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

        Amazon's fulfillment network SKU of the item.  # noqa: E501

        :return: The fulfillment_network_sku of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: str
        """
        return self._fulfillment_network_sku

    @fulfillment_network_sku.setter
    def fulfillment_network_sku(self, fulfillment_network_sku):
        """Sets the fulfillment_network_sku of this UpdateFulfillmentOrderItem.

        Amazon's fulfillment network SKU of the item.  # noqa: E501

        :param fulfillment_network_sku: The fulfillment_network_sku of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: str
        """

        self._fulfillment_network_sku = fulfillment_network_sku

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

        Indicates whether the item is sellable or unsellable.  # noqa: E501

        :return: The order_item_disposition of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: str
        """
        return self._order_item_disposition

    @order_item_disposition.setter
    def order_item_disposition(self, order_item_disposition):
        """Sets the order_item_disposition of this UpdateFulfillmentOrderItem.

        Indicates whether the item is sellable or unsellable.  # noqa: E501

        :param order_item_disposition: The order_item_disposition of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: str
        """

        self._order_item_disposition = order_item_disposition

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


        :return: The per_unit_declared_value of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: Money
        """
        return self._per_unit_declared_value

    @per_unit_declared_value.setter
    def per_unit_declared_value(self, per_unit_declared_value):
        """Sets the per_unit_declared_value of this UpdateFulfillmentOrderItem.


        :param per_unit_declared_value: The per_unit_declared_value of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: Money
        """

        self._per_unit_declared_value = per_unit_declared_value

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


        :return: The per_unit_price of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: Money
        """
        return self._per_unit_price

    @per_unit_price.setter
    def per_unit_price(self, per_unit_price):
        """Sets the per_unit_price of this UpdateFulfillmentOrderItem.


        :param per_unit_price: The per_unit_price of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: Money
        """

        self._per_unit_price = per_unit_price

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


        :return: The per_unit_tax of this UpdateFulfillmentOrderItem.  # noqa: E501
        :rtype: Money
        """
        return self._per_unit_tax

    @per_unit_tax.setter
    def per_unit_tax(self, per_unit_tax):
        """Sets the per_unit_tax of this UpdateFulfillmentOrderItem.


        :param per_unit_tax: The per_unit_tax of this UpdateFulfillmentOrderItem.  # noqa: E501
        :type: Money
        """

        self._per_unit_tax = per_unit_tax

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

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