# coding: utf-8

"""
    The Selling Partner API for Amazon External Fulfillment Return Item Processing

    You can use the Amazon External Fulfillment Return Item Processing API to retrieve, track, and process return items through Amazon's External Fulfillment returns management system.

    The version of the OpenAPI document: 2024-09-11
    Contact: marketplaceapitest@amazon.com
    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 ReturnMetadata(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 = {
        'return_reason': 'str',
        'rma_id': 'str',
        'fulfillment_order_id': 'str',
        'invoice_information': 'InvoiceInformation',
    }

    attribute_map = {
        'return_reason': 'returnReason',
        'rma_id': 'rmaId',
        'fulfillment_order_id': 'fulfillmentOrderId',
        'invoice_information': 'invoiceInformation',
    }

    def __init__(self, return_reason=None, rma_id=None, fulfillment_order_id=None, invoice_information=None, _configuration=None):  # noqa: E501
        """ReturnMetadata - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._return_reason = None
        self._rma_id = None
        self._fulfillment_order_id = None
        self._invoice_information = None
        self.discriminator = None

        self.return_reason = return_reason
        if rma_id is not None:
            self.rma_id = rma_id
        if fulfillment_order_id is not None:
            self.fulfillment_order_id = fulfillment_order_id
        if invoice_information is not None:
            self.invoice_information = invoice_information

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

        The reason for the return.  # noqa: E501

        :return: The return_reason of this ReturnMetadata.  # noqa: E501
        :rtype: str
        """
        return self._return_reason

    @return_reason.setter
    def return_reason(self, return_reason):
        """Sets the return_reason of this ReturnMetadata.

        The reason for the return.  # noqa: E501

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

        self._return_reason = return_reason

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

        The RMA ID of the return.  # noqa: E501

        :return: The rma_id of this ReturnMetadata.  # noqa: E501
        :rtype: str
        """
        return self._rma_id

    @rma_id.setter
    def rma_id(self, rma_id):
        """Sets the rma_id of this ReturnMetadata.

        The RMA ID of the return.  # noqa: E501

        :param rma_id: The rma_id of this ReturnMetadata.  # noqa: E501
        :type: str
        """

        self._rma_id = rma_id

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

        The SmartConnect ID of the fulfillment order for which the return was placed.  # noqa: E501

        :return: The fulfillment_order_id of this ReturnMetadata.  # noqa: E501
        :rtype: str
        """
        return self._fulfillment_order_id

    @fulfillment_order_id.setter
    def fulfillment_order_id(self, fulfillment_order_id):
        """Sets the fulfillment_order_id of this ReturnMetadata.

        The SmartConnect ID of the fulfillment order for which the return was placed.  # noqa: E501

        :param fulfillment_order_id: The fulfillment_order_id of this ReturnMetadata.  # noqa: E501
        :type: str
        """

        self._fulfillment_order_id = fulfillment_order_id

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


        :return: The invoice_information of this ReturnMetadata.  # noqa: E501
        :rtype: InvoiceInformation
        """
        return self._invoice_information

    @invoice_information.setter
    def invoice_information(self, invoice_information):
        """Sets the invoice_information of this ReturnMetadata.


        :param invoice_information: The invoice_information of this ReturnMetadata.  # noqa: E501
        :type: InvoiceInformation
        """

        self._invoice_information = invoice_information

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

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