# coding: utf-8

"""
    Selling Partner API for Merchant Fulfillment

    With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.

    The version of the OpenAPI document: v0
    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 RateItem(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 = {
        'rate_item_id': 'RateItemID',
        'rate_item_type': 'RateItemType',
        'rate_item_charge': 'CurrencyAmount',
        'rate_item_name_localization': 'str',
    }

    attribute_map = {
        'rate_item_id': 'RateItemID',
        'rate_item_type': 'RateItemType',
        'rate_item_charge': 'RateItemCharge',
        'rate_item_name_localization': 'RateItemNameLocalization',
    }

    def __init__(self, rate_item_id=None, rate_item_type=None, rate_item_charge=None, rate_item_name_localization=None, _configuration=None):  # noqa: E501
        """RateItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._rate_item_id = None
        self._rate_item_type = None
        self._rate_item_charge = None
        self._rate_item_name_localization = None
        self.discriminator = None

        self.rate_item_id = rate_item_id
        if rate_item_type is not None:
            self.rate_item_type = rate_item_type
        if rate_item_charge is not None:
            self.rate_item_charge = rate_item_charge
        if rate_item_name_localization is not None:
            self.rate_item_name_localization = rate_item_name_localization

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


        :return: The rate_item_id of this RateItem.  # noqa: E501
        :rtype: RateItemID
        """
        return self._rate_item_id

    @rate_item_id.setter
    def rate_item_id(self, rate_item_id):
        """Sets the rate_item_id of this RateItem.


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

        self._rate_item_id = rate_item_id

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


        :return: The rate_item_type of this RateItem.  # noqa: E501
        :rtype: RateItemType
        """
        return self._rate_item_type

    @rate_item_type.setter
    def rate_item_type(self, rate_item_type):
        """Sets the rate_item_type of this RateItem.


        :param rate_item_type: The rate_item_type of this RateItem.  # noqa: E501
        :type: RateItemType
        """

        self._rate_item_type = rate_item_type

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


        :return: The rate_item_charge of this RateItem.  # noqa: E501
        :rtype: CurrencyAmount
        """
        return self._rate_item_charge

    @rate_item_charge.setter
    def rate_item_charge(self, rate_item_charge):
        """Sets the rate_item_charge of this RateItem.


        :param rate_item_charge: The rate_item_charge of this RateItem.  # noqa: E501
        :type: CurrencyAmount
        """

        self._rate_item_charge = rate_item_charge

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

        Localized name for the RateItem.  # noqa: E501

        :return: The rate_item_name_localization of this RateItem.  # noqa: E501
        :rtype: str
        """
        return self._rate_item_name_localization

    @rate_item_name_localization.setter
    def rate_item_name_localization(self, rate_item_name_localization):
        """Sets the rate_item_name_localization of this RateItem.

        Localized name for the RateItem.  # noqa: E501

        :param rate_item_name_localization: The rate_item_name_localization of this RateItem.  # noqa: E501
        :type: str
        """

        self._rate_item_name_localization = rate_item_name_localization

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

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