# 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 ReturnItem(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_return_item_id': 'str',
        'seller_fulfillment_order_item_id': 'str',
        'amazon_shipment_id': 'str',
        'seller_return_reason_code': 'str',
        'return_comment': 'str',
        'amazon_return_reason_code': 'str',
        'status': 'FulfillmentReturnItemStatus',
        'status_changed_date': 'datetime',
        'return_authorization_id': 'str',
        'return_received_condition': 'ReturnItemDisposition',
        'fulfillment_center_id': 'str',
    }

    attribute_map = {
        'seller_return_item_id': 'sellerReturnItemId',
        'seller_fulfillment_order_item_id': 'sellerFulfillmentOrderItemId',
        'amazon_shipment_id': 'amazonShipmentId',
        'seller_return_reason_code': 'sellerReturnReasonCode',
        'return_comment': 'returnComment',
        'amazon_return_reason_code': 'amazonReturnReasonCode',
        'status': 'status',
        'status_changed_date': 'statusChangedDate',
        'return_authorization_id': 'returnAuthorizationId',
        'return_received_condition': 'returnReceivedCondition',
        'fulfillment_center_id': 'fulfillmentCenterId',
    }

    def __init__(self, seller_return_item_id=None, seller_fulfillment_order_item_id=None, amazon_shipment_id=None, seller_return_reason_code=None, return_comment=None, amazon_return_reason_code=None, status=None, status_changed_date=None, return_authorization_id=None, return_received_condition=None, fulfillment_center_id=None, _configuration=None):  # noqa: E501
        """ReturnItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._seller_return_item_id = None
        self._seller_fulfillment_order_item_id = None
        self._amazon_shipment_id = None
        self._seller_return_reason_code = None
        self._return_comment = None
        self._amazon_return_reason_code = None
        self._status = None
        self._status_changed_date = None
        self._return_authorization_id = None
        self._return_received_condition = None
        self._fulfillment_center_id = None
        self.discriminator = None

        self.seller_return_item_id = seller_return_item_id
        self.seller_fulfillment_order_item_id = seller_fulfillment_order_item_id
        self.amazon_shipment_id = amazon_shipment_id
        self.seller_return_reason_code = seller_return_reason_code
        if return_comment is not None:
            self.return_comment = return_comment
        if amazon_return_reason_code is not None:
            self.amazon_return_reason_code = amazon_return_reason_code
        self.status = status
        self.status_changed_date = status_changed_date
        if return_authorization_id is not None:
            self.return_authorization_id = return_authorization_id
        if return_received_condition is not None:
            self.return_received_condition = return_received_condition
        if fulfillment_center_id is not None:
            self.fulfillment_center_id = fulfillment_center_id

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

        An identifier assigned by the seller to the return item.  # noqa: E501

        :return: The seller_return_item_id of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._seller_return_item_id

    @seller_return_item_id.setter
    def seller_return_item_id(self, seller_return_item_id):
        """Sets the seller_return_item_id of this ReturnItem.

        An identifier assigned by the seller to the return item.  # noqa: E501

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

        self._seller_return_item_id = seller_return_item_id

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

        The identifier assigned to the item by the seller when the fulfillment order was created.  # noqa: E501

        :return: The seller_fulfillment_order_item_id of this ReturnItem.  # 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 ReturnItem.

        The identifier assigned to the item by the seller when the fulfillment order was created.  # noqa: E501

        :param seller_fulfillment_order_item_id: The seller_fulfillment_order_item_id of this ReturnItem.  # 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

        self._seller_fulfillment_order_item_id = seller_fulfillment_order_item_id

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

        The identifier for the shipment that is associated with the return item.  # noqa: E501

        :return: The amazon_shipment_id of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._amazon_shipment_id

    @amazon_shipment_id.setter
    def amazon_shipment_id(self, amazon_shipment_id):
        """Sets the amazon_shipment_id of this ReturnItem.

        The identifier for the shipment that is associated with the return item.  # noqa: E501

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

        self._amazon_shipment_id = amazon_shipment_id

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

        The return reason code assigned to the return item by the seller.  # noqa: E501

        :return: The seller_return_reason_code of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._seller_return_reason_code

    @seller_return_reason_code.setter
    def seller_return_reason_code(self, seller_return_reason_code):
        """Sets the seller_return_reason_code of this ReturnItem.

        The return reason code assigned to the return item by the seller.  # noqa: E501

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

        self._seller_return_reason_code = seller_return_reason_code

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

        An optional comment about the return item.  # noqa: E501

        :return: The return_comment of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._return_comment

    @return_comment.setter
    def return_comment(self, return_comment):
        """Sets the return_comment of this ReturnItem.

        An optional comment about the return item.  # noqa: E501

        :param return_comment: The return_comment of this ReturnItem.  # noqa: E501
        :type: str
        """

        self._return_comment = return_comment

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

        The return reason code that the Amazon fulfillment center assigned to the return item.  # noqa: E501

        :return: The amazon_return_reason_code of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._amazon_return_reason_code

    @amazon_return_reason_code.setter
    def amazon_return_reason_code(self, amazon_return_reason_code):
        """Sets the amazon_return_reason_code of this ReturnItem.

        The return reason code that the Amazon fulfillment center assigned to the return item.  # noqa: E501

        :param amazon_return_reason_code: The amazon_return_reason_code of this ReturnItem.  # noqa: E501
        :type: str
        """

        self._amazon_return_reason_code = amazon_return_reason_code

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


        :return: The status of this ReturnItem.  # noqa: E501
        :rtype: FulfillmentReturnItemStatus
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ReturnItem.


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

        self._status = status

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

        Date timestamp  # noqa: E501

        :return: The status_changed_date of this ReturnItem.  # noqa: E501
        :rtype: datetime
        """
        return self._status_changed_date

    @status_changed_date.setter
    def status_changed_date(self, status_changed_date):
        """Sets the status_changed_date of this ReturnItem.

        Date timestamp  # noqa: E501

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

        self._status_changed_date = status_changed_date

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

        Identifies the return authorization used to return this item. Refer to `ReturnAuthorization`.  # noqa: E501

        :return: The return_authorization_id of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._return_authorization_id

    @return_authorization_id.setter
    def return_authorization_id(self, return_authorization_id):
        """Sets the return_authorization_id of this ReturnItem.

        Identifies the return authorization used to return this item. Refer to `ReturnAuthorization`.  # noqa: E501

        :param return_authorization_id: The return_authorization_id of this ReturnItem.  # noqa: E501
        :type: str
        """

        self._return_authorization_id = return_authorization_id

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


        :return: The return_received_condition of this ReturnItem.  # noqa: E501
        :rtype: ReturnItemDisposition
        """
        return self._return_received_condition

    @return_received_condition.setter
    def return_received_condition(self, return_received_condition):
        """Sets the return_received_condition of this ReturnItem.


        :param return_received_condition: The return_received_condition of this ReturnItem.  # noqa: E501
        :type: ReturnItemDisposition
        """

        self._return_received_condition = return_received_condition

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

        The identifier for the Amazon fulfillment center that processed the return item.  # noqa: E501

        :return: The fulfillment_center_id of this ReturnItem.  # noqa: E501
        :rtype: str
        """
        return self._fulfillment_center_id

    @fulfillment_center_id.setter
    def fulfillment_center_id(self, fulfillment_center_id):
        """Sets the fulfillment_center_id of this ReturnItem.

        The identifier for the Amazon fulfillment center that processed the return item.  # noqa: E501

        :param fulfillment_center_id: The fulfillment_center_id of this ReturnItem.  # noqa: E501
        :type: str
        """

        self._fulfillment_center_id = fulfillment_center_id

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

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