# 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 OrderAcknowledgementItem(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 = {
        'purchase_order_number': 'str',
        'vendor_order_number': 'str',
        'acknowledgement_date': 'datetime',
        'acknowledgement_status': 'AcknowledgementStatus',
        'selling_party': 'PartyIdentification',
        'ship_from_party': 'PartyIdentification',
        'item_acknowledgements': 'List[OrderItemAcknowledgement]',
    }

    attribute_map = {
        'purchase_order_number': 'purchaseOrderNumber',
        'vendor_order_number': 'vendorOrderNumber',
        'acknowledgement_date': 'acknowledgementDate',
        'acknowledgement_status': 'acknowledgementStatus',
        'selling_party': 'sellingParty',
        'ship_from_party': 'shipFromParty',
        'item_acknowledgements': 'itemAcknowledgements',
    }

    def __init__(self, purchase_order_number=None, vendor_order_number=None, acknowledgement_date=None, acknowledgement_status=None, selling_party=None, ship_from_party=None, item_acknowledgements=None, _configuration=None):  # noqa: E501
        """OrderAcknowledgementItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._purchase_order_number = None
        self._vendor_order_number = None
        self._acknowledgement_date = None
        self._acknowledgement_status = None
        self._selling_party = None
        self._ship_from_party = None
        self._item_acknowledgements = None
        self.discriminator = None

        self.purchase_order_number = purchase_order_number
        self.vendor_order_number = vendor_order_number
        self.acknowledgement_date = acknowledgement_date
        self.acknowledgement_status = acknowledgement_status
        self.selling_party = selling_party
        self.ship_from_party = ship_from_party
        self.item_acknowledgements = item_acknowledgements

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

        The purchase order number for this order. Formatting Notes: alpha-numeric code.  # noqa: E501

        :return: The purchase_order_number of this OrderAcknowledgementItem.  # noqa: E501
        :rtype: str
        """
        return self._purchase_order_number

    @purchase_order_number.setter
    def purchase_order_number(self, purchase_order_number):
        """Sets the purchase_order_number of this OrderAcknowledgementItem.

        The purchase order number for this order. Formatting Notes: alpha-numeric code.  # noqa: E501

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

        self._purchase_order_number = purchase_order_number

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

        The vendor's order number for this order.  # noqa: E501

        :return: The vendor_order_number of this OrderAcknowledgementItem.  # noqa: E501
        :rtype: str
        """
        return self._vendor_order_number

    @vendor_order_number.setter
    def vendor_order_number(self, vendor_order_number):
        """Sets the vendor_order_number of this OrderAcknowledgementItem.

        The vendor's order number for this order.  # noqa: E501

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

        self._vendor_order_number = vendor_order_number

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

        The date and time when the order is acknowledged, in ISO-8601 date/time format. For example: 2018-07-16T23:00:00Z / 2018-07-16T23:00:00-05:00 / 2018-07-16T23:00:00-08:00.  # noqa: E501

        :return: The acknowledgement_date of this OrderAcknowledgementItem.  # noqa: E501
        :rtype: datetime
        """
        return self._acknowledgement_date

    @acknowledgement_date.setter
    def acknowledgement_date(self, acknowledgement_date):
        """Sets the acknowledgement_date of this OrderAcknowledgementItem.

        The date and time when the order is acknowledged, in ISO-8601 date/time format. For example: 2018-07-16T23:00:00Z / 2018-07-16T23:00:00-05:00 / 2018-07-16T23:00:00-08:00.  # noqa: E501

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

        self._acknowledgement_date = acknowledgement_date

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


        :return: The acknowledgement_status of this OrderAcknowledgementItem.  # noqa: E501
        :rtype: AcknowledgementStatus
        """
        return self._acknowledgement_status

    @acknowledgement_status.setter
    def acknowledgement_status(self, acknowledgement_status):
        """Sets the acknowledgement_status of this OrderAcknowledgementItem.


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

        self._acknowledgement_status = acknowledgement_status

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


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

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


        :param selling_party: The selling_party of this OrderAcknowledgementItem.  # 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 ship_from_party(self):
        """Gets the ship_from_party of this OrderAcknowledgementItem.  # noqa: E501


        :return: The ship_from_party of this OrderAcknowledgementItem.  # noqa: E501
        :rtype: PartyIdentification
        """
        return self._ship_from_party

    @ship_from_party.setter
    def ship_from_party(self, ship_from_party):
        """Sets the ship_from_party of this OrderAcknowledgementItem.


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

        self._ship_from_party = ship_from_party

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

        Item details including acknowledged quantity.  # noqa: E501

        :return: The item_acknowledgements of this OrderAcknowledgementItem.  # noqa: E501
        :rtype: List[OrderItemAcknowledgement]
        """
        return self._item_acknowledgements

    @item_acknowledgements.setter
    def item_acknowledgements(self, item_acknowledgements):
        """Sets the item_acknowledgements of this OrderAcknowledgementItem.

        Item details including acknowledged quantity.  # noqa: E501

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

        self._item_acknowledgements = item_acknowledgements

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

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