# coding: utf-8

"""
    Selling Partner API for Direct Fulfillment Orders

    The Selling Partner API for Direct Fulfillment Orders provides programmatic access to a direct fulfillment vendor's order data.

    The version of the OpenAPI document: 2021-12-28
    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 OrderItem(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 = {
        'item_sequence_number': 'str',
        'buyer_product_identifier': 'str',
        'vendor_product_identifier': 'str',
        'title': 'str',
        'ordered_quantity': 'ItemQuantity',
        'scheduled_delivery_shipment': 'ScheduledDeliveryShipment',
        'gift_details': 'GiftDetails',
        'net_price': 'Money',
        'tax_details': 'TaxItemDetails',
        'total_price': 'Money',
        'buyer_customized_info': 'BuyerCustomizedInfoDetail',
    }

    attribute_map = {
        'item_sequence_number': 'itemSequenceNumber',
        'buyer_product_identifier': 'buyerProductIdentifier',
        'vendor_product_identifier': 'vendorProductIdentifier',
        'title': 'title',
        'ordered_quantity': 'orderedQuantity',
        'scheduled_delivery_shipment': 'scheduledDeliveryShipment',
        'gift_details': 'giftDetails',
        'net_price': 'netPrice',
        'tax_details': 'taxDetails',
        'total_price': 'totalPrice',
        'buyer_customized_info': 'buyerCustomizedInfo',
    }

    def __init__(self, item_sequence_number=None, buyer_product_identifier=None, vendor_product_identifier=None, title=None, ordered_quantity=None, scheduled_delivery_shipment=None, gift_details=None, net_price=None, tax_details=None, total_price=None, buyer_customized_info=None, _configuration=None):  # noqa: E501
        """OrderItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._item_sequence_number = None
        self._buyer_product_identifier = None
        self._vendor_product_identifier = None
        self._title = None
        self._ordered_quantity = None
        self._scheduled_delivery_shipment = None
        self._gift_details = None
        self._net_price = None
        self._tax_details = None
        self._total_price = None
        self._buyer_customized_info = None
        self.discriminator = None

        self.item_sequence_number = item_sequence_number
        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
        if title is not None:
            self.title = title
        self.ordered_quantity = ordered_quantity
        if scheduled_delivery_shipment is not None:
            self.scheduled_delivery_shipment = scheduled_delivery_shipment
        if gift_details is not None:
            self.gift_details = gift_details
        self.net_price = net_price
        if tax_details is not None:
            self.tax_details = tax_details
        if total_price is not None:
            self.total_price = total_price
        if buyer_customized_info is not None:
            self.buyer_customized_info = buyer_customized_info

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

        Numbering of the item on the purchase order. The first item will be 1, the second 2, and so on.  # noqa: E501

        :return: The item_sequence_number of this OrderItem.  # noqa: E501
        :rtype: str
        """
        return self._item_sequence_number

    @item_sequence_number.setter
    def item_sequence_number(self, item_sequence_number):
        """Sets the item_sequence_number of this OrderItem.

        Numbering of the item on the purchase order. The first item will be 1, the second 2, and so on.  # noqa: E501

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

        self._item_sequence_number = item_sequence_number

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

        Buyer's standard identification number (ASIN) of an item.  # noqa: E501

        :return: The buyer_product_identifier of this OrderItem.  # 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 OrderItem.

        Buyer's standard identification number (ASIN) of an item.  # noqa: E501

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

        self._buyer_product_identifier = buyer_product_identifier

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

        The vendor selected product identification of the item.  # noqa: E501

        :return: The vendor_product_identifier of this OrderItem.  # 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 OrderItem.

        The vendor selected product identification of the item.  # noqa: E501

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

        self._vendor_product_identifier = vendor_product_identifier

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

        Title for the item.  # noqa: E501

        :return: The title of this OrderItem.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this OrderItem.

        Title for the item.  # noqa: E501

        :param title: The title of this OrderItem.  # noqa: E501
        :type: str
        """

        self._title = title

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


        :return: The ordered_quantity of this OrderItem.  # noqa: E501
        :rtype: ItemQuantity
        """
        return self._ordered_quantity

    @ordered_quantity.setter
    def ordered_quantity(self, ordered_quantity):
        """Sets the ordered_quantity of this OrderItem.


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

        self._ordered_quantity = ordered_quantity

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


        :return: The scheduled_delivery_shipment of this OrderItem.  # noqa: E501
        :rtype: ScheduledDeliveryShipment
        """
        return self._scheduled_delivery_shipment

    @scheduled_delivery_shipment.setter
    def scheduled_delivery_shipment(self, scheduled_delivery_shipment):
        """Sets the scheduled_delivery_shipment of this OrderItem.


        :param scheduled_delivery_shipment: The scheduled_delivery_shipment of this OrderItem.  # noqa: E501
        :type: ScheduledDeliveryShipment
        """

        self._scheduled_delivery_shipment = scheduled_delivery_shipment

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


        :return: The gift_details of this OrderItem.  # noqa: E501
        :rtype: GiftDetails
        """
        return self._gift_details

    @gift_details.setter
    def gift_details(self, gift_details):
        """Sets the gift_details of this OrderItem.


        :param gift_details: The gift_details of this OrderItem.  # noqa: E501
        :type: GiftDetails
        """

        self._gift_details = gift_details

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


        :return: The net_price of this OrderItem.  # noqa: E501
        :rtype: Money
        """
        return self._net_price

    @net_price.setter
    def net_price(self, net_price):
        """Sets the net_price of this OrderItem.


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

        self._net_price = net_price

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


        :return: The tax_details of this OrderItem.  # noqa: E501
        :rtype: TaxItemDetails
        """
        return self._tax_details

    @tax_details.setter
    def tax_details(self, tax_details):
        """Sets the tax_details of this OrderItem.


        :param tax_details: The tax_details of this OrderItem.  # noqa: E501
        :type: TaxItemDetails
        """

        self._tax_details = tax_details

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


        :return: The total_price of this OrderItem.  # noqa: E501
        :rtype: Money
        """
        return self._total_price

    @total_price.setter
    def total_price(self, total_price):
        """Sets the total_price of this OrderItem.


        :param total_price: The total_price of this OrderItem.  # noqa: E501
        :type: Money
        """

        self._total_price = total_price

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


        :return: The buyer_customized_info of this OrderItem.  # noqa: E501
        :rtype: BuyerCustomizedInfoDetail
        """
        return self._buyer_customized_info

    @buyer_customized_info.setter
    def buyer_customized_info(self, buyer_customized_info):
        """Sets the buyer_customized_info of this OrderItem.


        :param buyer_customized_info: The buyer_customized_info of this OrderItem.  # noqa: E501
        :type: BuyerCustomizedInfoDetail
        """

        self._buyer_customized_info = buyer_customized_info

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

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