# coding: utf-8

"""
    Selling Partner API for Retail Procurement Shipments

    The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.

    The version of the OpenAPI document: v1
    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 CarrierDetails(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 = {
        'name': 'str',
        'code': 'str',
        'phone': 'str',
        'email': 'str',
        'shipment_reference_number': 'str',
    }

    attribute_map = {
        'name': 'name',
        'code': 'code',
        'phone': 'phone',
        'email': 'email',
        'shipment_reference_number': 'shipmentReferenceNumber',
    }

    def __init__(self, name=None, code=None, phone=None, email=None, shipment_reference_number=None, _configuration=None):  # noqa: E501
        """CarrierDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._code = None
        self._phone = None
        self._email = None
        self._shipment_reference_number = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if code is not None:
            self.code = code
        if phone is not None:
            self.phone = phone
        if email is not None:
            self.email = email
        if shipment_reference_number is not None:
            self.shipment_reference_number = shipment_reference_number

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

        The field is used to represent the carrier used for performing the shipment.  # noqa: E501

        :return: The name of this CarrierDetails.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this CarrierDetails.

        The field is used to represent the carrier used for performing the shipment.  # noqa: E501

        :param name: The name of this CarrierDetails.  # noqa: E501
        :type: str
        """

        self._name = name

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

        Code that identifies the carrier for the shipment. The Standard Carrier Alpha Code (SCAC) is a unique two to four letter code used to identify a carrier. Carrier SCAC codes are assigned and maintained by the NMFTA (National Motor Freight Association).  # noqa: E501

        :return: The code of this CarrierDetails.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this CarrierDetails.

        Code that identifies the carrier for the shipment. The Standard Carrier Alpha Code (SCAC) is a unique two to four letter code used to identify a carrier. Carrier SCAC codes are assigned and maintained by the NMFTA (National Motor Freight Association).  # noqa: E501

        :param code: The code of this CarrierDetails.  # noqa: E501
        :type: str
        """

        self._code = code

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

        The field is used to represent the Carrier contact number.  # noqa: E501

        :return: The phone of this CarrierDetails.  # noqa: E501
        :rtype: str
        """
        return self._phone

    @phone.setter
    def phone(self, phone):
        """Sets the phone of this CarrierDetails.

        The field is used to represent the Carrier contact number.  # noqa: E501

        :param phone: The phone of this CarrierDetails.  # noqa: E501
        :type: str
        """

        self._phone = phone

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

        The field is used to represent the carrier Email id.  # noqa: E501

        :return: The email of this CarrierDetails.  # noqa: E501
        :rtype: str
        """
        return self._email

    @email.setter
    def email(self, email):
        """Sets the email of this CarrierDetails.

        The field is used to represent the carrier Email id.  # noqa: E501

        :param email: The email of this CarrierDetails.  # noqa: E501
        :type: str
        """

        self._email = email

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

        The field is also known as PRO number is a unique number assigned by the carrier. It is used to identify and track the shipment that goes out for delivery. This field is mandatory for US, CA, MX shipment confirmations.  # noqa: E501

        :return: The shipment_reference_number of this CarrierDetails.  # noqa: E501
        :rtype: str
        """
        return self._shipment_reference_number

    @shipment_reference_number.setter
    def shipment_reference_number(self, shipment_reference_number):
        """Sets the shipment_reference_number of this CarrierDetails.

        The field is also known as PRO number is a unique number assigned by the carrier. It is used to identify and track the shipment that goes out for delivery. This field is mandatory for US, CA, MX shipment confirmations.  # noqa: E501

        :param shipment_reference_number: The shipment_reference_number of this CarrierDetails.  # noqa: E501
        :type: str
        """

        self._shipment_reference_number = shipment_reference_number

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

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