# 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 TransportationDetailsForShipmentConfirmation(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_scac': 'str',
        'carrier_shipment_reference_number': 'str',
        'transportation_mode': 'str',
        'bill_of_lading_number': 'str',
    }

    attribute_map = {
        'carrier_scac': 'carrierScac',
        'carrier_shipment_reference_number': 'carrierShipmentReferenceNumber',
        'transportation_mode': 'transportationMode',
        'bill_of_lading_number': 'billOfLadingNumber',
    }

    def __init__(self, carrier_scac=None, carrier_shipment_reference_number=None, transportation_mode=None, bill_of_lading_number=None, _configuration=None):  # noqa: E501
        """TransportationDetailsForShipmentConfirmation - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._carrier_scac = None
        self._carrier_shipment_reference_number = None
        self._transportation_mode = None
        self._bill_of_lading_number = None
        self.discriminator = None

        if carrier_scac is not None:
            self.carrier_scac = carrier_scac
        if carrier_shipment_reference_number is not None:
            self.carrier_shipment_reference_number = carrier_shipment_reference_number
        if transportation_mode is not None:
            self.transportation_mode = transportation_mode
        if bill_of_lading_number is not None:
            self.bill_of_lading_number = bill_of_lading_number

    @property
    def carrier_scac(self):
        """Gets the carrier_scac of this TransportationDetailsForShipmentConfirmation.  # 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). This field is mandatory for US, CA, MX shipment confirmations.  # noqa: E501

        :return: The carrier_scac of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :rtype: str
        """
        return self._carrier_scac

    @carrier_scac.setter
    def carrier_scac(self, carrier_scac):
        """Sets the carrier_scac of this TransportationDetailsForShipmentConfirmation.

        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). This field is mandatory for US, CA, MX shipment confirmations.  # noqa: E501

        :param carrier_scac: The carrier_scac of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :type: str
        """

        self._carrier_scac = carrier_scac

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

        The field 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 UA, CA, MX shipment confirmations.  # noqa: E501

        :return: The carrier_shipment_reference_number of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :rtype: str
        """
        return self._carrier_shipment_reference_number

    @carrier_shipment_reference_number.setter
    def carrier_shipment_reference_number(self, carrier_shipment_reference_number):
        """Sets the carrier_shipment_reference_number of this TransportationDetailsForShipmentConfirmation.

        The field 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 UA, CA, MX shipment confirmations.  # noqa: E501

        :param carrier_shipment_reference_number: The carrier_shipment_reference_number of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :type: str
        """

        self._carrier_shipment_reference_number = carrier_shipment_reference_number

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

        The mode of transportation for this shipment.  # noqa: E501

        :return: The transportation_mode of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :rtype: str
        """
        return self._transportation_mode

    @transportation_mode.setter
    def transportation_mode(self, transportation_mode):
        """Sets the transportation_mode of this TransportationDetailsForShipmentConfirmation.

        The mode of transportation for this shipment.  # noqa: E501

        :param transportation_mode: The transportation_mode of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :type: str
        """
        allowed_values = ["Road", "Air", "Ocean"]  # noqa: E501
        if (self._configuration.client_side_validation and
                transportation_mode not in allowed_values):
            raise ValueError(
                "Invalid value for `transportation_mode` ({0}), must be one of {1}"  # noqa: E501
                .format(transportation_mode, allowed_values)
            )

        self._transportation_mode = transportation_mode

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

        The Bill of Lading (BOL) number is a unique number assigned to each shipment of goods by the vendor or shipper during the creation of the Bill of Lading. This number must be unique for every shipment and cannot be a date/time or single character. The BOL numer is mandatory in Shipment Confirmation message for FTL and LTL shipments, and must match the paper BOL provided with the shipment. Instead of BOL, an alternative reference number (like Delivery Note Number) for the shipment can also be sent in this field.  # noqa: E501

        :return: The bill_of_lading_number of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :rtype: str
        """
        return self._bill_of_lading_number

    @bill_of_lading_number.setter
    def bill_of_lading_number(self, bill_of_lading_number):
        """Sets the bill_of_lading_number of this TransportationDetailsForShipmentConfirmation.

        The Bill of Lading (BOL) number is a unique number assigned to each shipment of goods by the vendor or shipper during the creation of the Bill of Lading. This number must be unique for every shipment and cannot be a date/time or single character. The BOL numer is mandatory in Shipment Confirmation message for FTL and LTL shipments, and must match the paper BOL provided with the shipment. Instead of BOL, an alternative reference number (like Delivery Note Number) for the shipment can also be sent in this field.  # noqa: E501

        :param bill_of_lading_number: The bill_of_lading_number of this TransportationDetailsForShipmentConfirmation.  # noqa: E501
        :type: str
        """

        self._bill_of_lading_number = bill_of_lading_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(TransportationDetailsForShipmentConfirmation, 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, TransportationDetailsForShipmentConfirmation):
            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, TransportationDetailsForShipmentConfirmation):
            return True

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