# coding: utf-8

"""
    Selling Partner API for Merchant Fulfillment

    The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.  # noqa: E501

    OpenAPI spec version: v0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from src.api_models.mfn_api.swagger_client.configuration import Configuration


class RejectedShippingService(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 = {
        'carrier_name': 'str',
        'shipping_service_name': 'str',
        'shipping_service_id': 'ShippingServiceIdentifier',
        'rejection_reason_code': 'str',
        'rejection_reason_message': 'str'
    }

    attribute_map = {
        'carrier_name': 'CarrierName',
        'shipping_service_name': 'ShippingServiceName',
        'shipping_service_id': 'ShippingServiceId',
        'rejection_reason_code': 'RejectionReasonCode',
        'rejection_reason_message': 'RejectionReasonMessage'
    }

    def __init__(self, carrier_name=None, shipping_service_name=None, shipping_service_id=None, rejection_reason_code=None, rejection_reason_message=None, _configuration=None):  # noqa: E501
        """RejectedShippingService - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._carrier_name = None
        self._shipping_service_name = None
        self._shipping_service_id = None
        self._rejection_reason_code = None
        self._rejection_reason_message = None
        self.discriminator = None

        self.carrier_name = carrier_name
        self.shipping_service_name = shipping_service_name
        self.shipping_service_id = shipping_service_id
        self.rejection_reason_code = rejection_reason_code
        if rejection_reason_message is not None:
            self.rejection_reason_message = rejection_reason_message

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

        The rejected shipping carrier name. e.g. USPS  # noqa: E501

        :return: The carrier_name of this RejectedShippingService.  # noqa: E501
        :rtype: str
        """
        return self._carrier_name

    @carrier_name.setter
    def carrier_name(self, carrier_name):
        """Sets the carrier_name of this RejectedShippingService.

        The rejected shipping carrier name. e.g. USPS  # noqa: E501

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

        self._carrier_name = carrier_name

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

        The rejected shipping service localized name. e.g. FedEx Standard Overnight  # noqa: E501

        :return: The shipping_service_name of this RejectedShippingService.  # noqa: E501
        :rtype: str
        """
        return self._shipping_service_name

    @shipping_service_name.setter
    def shipping_service_name(self, shipping_service_name):
        """Sets the shipping_service_name of this RejectedShippingService.

        The rejected shipping service localized name. e.g. FedEx Standard Overnight  # noqa: E501

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

        self._shipping_service_name = shipping_service_name

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

        The rejected shipping service identifier. e.g. FEDEX_PTP_STANDARD_OVERNIGHT  # noqa: E501

        :return: The shipping_service_id of this RejectedShippingService.  # noqa: E501
        :rtype: ShippingServiceIdentifier
        """
        return self._shipping_service_id

    @shipping_service_id.setter
    def shipping_service_id(self, shipping_service_id):
        """Sets the shipping_service_id of this RejectedShippingService.

        The rejected shipping service identifier. e.g. FEDEX_PTP_STANDARD_OVERNIGHT  # noqa: E501

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

        self._shipping_service_id = shipping_service_id

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

        A reason code meant to be consumed programatically. e.g. CARRIER_CANNOT_SHIP_TO_POBOX  # noqa: E501

        :return: The rejection_reason_code of this RejectedShippingService.  # noqa: E501
        :rtype: str
        """
        return self._rejection_reason_code

    @rejection_reason_code.setter
    def rejection_reason_code(self, rejection_reason_code):
        """Sets the rejection_reason_code of this RejectedShippingService.

        A reason code meant to be consumed programatically. e.g. CARRIER_CANNOT_SHIP_TO_POBOX  # noqa: E501

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

        self._rejection_reason_code = rejection_reason_code

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

        A localized human readable description of the rejected reason.  # noqa: E501

        :return: The rejection_reason_message of this RejectedShippingService.  # noqa: E501
        :rtype: str
        """
        return self._rejection_reason_message

    @rejection_reason_message.setter
    def rejection_reason_message(self, rejection_reason_message):
        """Sets the rejection_reason_message of this RejectedShippingService.

        A localized human readable description of the rejected reason.  # noqa: E501

        :param rejection_reason_message: The rejection_reason_message of this RejectedShippingService.  # noqa: E501
        :type: str
        """

        self._rejection_reason_message = rejection_reason_message

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

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