# 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 ReturnAuthorization(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_authorization_id': 'str',
        'fulfillment_center_id': 'str',
        'return_to_address': 'Address',
        'amazon_rma_id': 'str',
        'rma_page_url': 'str',
    }

    attribute_map = {
        'return_authorization_id': 'returnAuthorizationId',
        'fulfillment_center_id': 'fulfillmentCenterId',
        'return_to_address': 'returnToAddress',
        'amazon_rma_id': 'amazonRmaId',
        'rma_page_url': 'rmaPageURL',
    }

    def __init__(self, return_authorization_id=None, fulfillment_center_id=None, return_to_address=None, amazon_rma_id=None, rma_page_url=None, _configuration=None):  # noqa: E501
        """ReturnAuthorization - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._return_authorization_id = None
        self._fulfillment_center_id = None
        self._return_to_address = None
        self._amazon_rma_id = None
        self._rma_page_url = None
        self.discriminator = None

        self.return_authorization_id = return_authorization_id
        self.fulfillment_center_id = fulfillment_center_id
        self.return_to_address = return_to_address
        self.amazon_rma_id = amazon_rma_id
        self.rma_page_url = rma_page_url

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

        An identifier for the return authorization. This identifier associates return items with the return authorization used to return them.  # noqa: E501

        :return: The return_authorization_id of this ReturnAuthorization.  # 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 ReturnAuthorization.

        An identifier for the return authorization. This identifier associates return items with the return authorization used to return them.  # noqa: E501

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

        self._return_authorization_id = return_authorization_id

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

        An identifier for the Amazon fulfillment center to which the return items should be sent.  # noqa: E501

        :return: The fulfillment_center_id of this ReturnAuthorization.  # 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 ReturnAuthorization.

        An identifier for the Amazon fulfillment center to which the return items should be sent.  # noqa: E501

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

        self._fulfillment_center_id = fulfillment_center_id

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


        :return: The return_to_address of this ReturnAuthorization.  # noqa: E501
        :rtype: Address
        """
        return self._return_to_address

    @return_to_address.setter
    def return_to_address(self, return_to_address):
        """Sets the return_to_address of this ReturnAuthorization.


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

        self._return_to_address = return_to_address

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

        The return merchandise authorization (RMA) that Amazon needs to process the return.  # noqa: E501

        :return: The amazon_rma_id of this ReturnAuthorization.  # noqa: E501
        :rtype: str
        """
        return self._amazon_rma_id

    @amazon_rma_id.setter
    def amazon_rma_id(self, amazon_rma_id):
        """Sets the amazon_rma_id of this ReturnAuthorization.

        The return merchandise authorization (RMA) that Amazon needs to process the return.  # noqa: E501

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

        self._amazon_rma_id = amazon_rma_id

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

        A URL for a web page that contains the return authorization barcode and the mailing label. This does not include pre-paid shipping.  # noqa: E501

        :return: The rma_page_url of this ReturnAuthorization.  # noqa: E501
        :rtype: str
        """
        return self._rma_page_url

    @rma_page_url.setter
    def rma_page_url(self, rma_page_url):
        """Sets the rma_page_url of this ReturnAuthorization.

        A URL for a web page that contains the return authorization barcode and the mailing label. This does not include pre-paid shipping.  # noqa: E501

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

        self._rma_page_url = rma_page_url

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

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