# 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 TransportationDetails(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 = {
        'ship_mode': 'str',
        'transportation_mode': 'str',
        'shipped_date': 'datetime',
        'estimated_delivery_date': 'datetime',
        'shipment_delivery_date': 'datetime',
        'carrier_details': 'CarrierDetails',
        'bill_of_lading_number': 'str',
    }

    attribute_map = {
        'ship_mode': 'shipMode',
        'transportation_mode': 'transportationMode',
        'shipped_date': 'shippedDate',
        'estimated_delivery_date': 'estimatedDeliveryDate',
        'shipment_delivery_date': 'shipmentDeliveryDate',
        'carrier_details': 'carrierDetails',
        'bill_of_lading_number': 'billOfLadingNumber',
    }

    def __init__(self, ship_mode=None, transportation_mode=None, shipped_date=None, estimated_delivery_date=None, shipment_delivery_date=None, carrier_details=None, bill_of_lading_number=None, _configuration=None):  # noqa: E501
        """TransportationDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._ship_mode = None
        self._transportation_mode = None
        self._shipped_date = None
        self._estimated_delivery_date = None
        self._shipment_delivery_date = None
        self._carrier_details = None
        self._bill_of_lading_number = None
        self.discriminator = None

        if ship_mode is not None:
            self.ship_mode = ship_mode
        if transportation_mode is not None:
            self.transportation_mode = transportation_mode
        if shipped_date is not None:
            self.shipped_date = shipped_date
        if estimated_delivery_date is not None:
            self.estimated_delivery_date = estimated_delivery_date
        if shipment_delivery_date is not None:
            self.shipment_delivery_date = shipment_delivery_date
        if carrier_details is not None:
            self.carrier_details = carrier_details
        if bill_of_lading_number is not None:
            self.bill_of_lading_number = bill_of_lading_number

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

        The type of shipment.  # noqa: E501

        :return: The ship_mode of this TransportationDetails.  # noqa: E501
        :rtype: str
        """
        return self._ship_mode

    @ship_mode.setter
    def ship_mode(self, ship_mode):
        """Sets the ship_mode of this TransportationDetails.

        The type of shipment.  # noqa: E501

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

        self._ship_mode = ship_mode

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

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

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

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

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

        :param transportation_mode: The transportation_mode of this TransportationDetails.  # 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 shipped_date(self):
        """Gets the shipped_date of this TransportationDetails.  # noqa: E501

        Date when shipment is performed by the Vendor to Buyer  # noqa: E501

        :return: The shipped_date of this TransportationDetails.  # noqa: E501
        :rtype: datetime
        """
        return self._shipped_date

    @shipped_date.setter
    def shipped_date(self, shipped_date):
        """Sets the shipped_date of this TransportationDetails.

        Date when shipment is performed by the Vendor to Buyer  # noqa: E501

        :param shipped_date: The shipped_date of this TransportationDetails.  # noqa: E501
        :type: datetime
        """

        self._shipped_date = shipped_date

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

        Estimated Date on which shipment will be delivered from Vendor to Buyer  # noqa: E501

        :return: The estimated_delivery_date of this TransportationDetails.  # noqa: E501
        :rtype: datetime
        """
        return self._estimated_delivery_date

    @estimated_delivery_date.setter
    def estimated_delivery_date(self, estimated_delivery_date):
        """Sets the estimated_delivery_date of this TransportationDetails.

        Estimated Date on which shipment will be delivered from Vendor to Buyer  # noqa: E501

        :param estimated_delivery_date: The estimated_delivery_date of this TransportationDetails.  # noqa: E501
        :type: datetime
        """

        self._estimated_delivery_date = estimated_delivery_date

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

        Date on which shipment will be delivered from Vendor to Buyer  # noqa: E501

        :return: The shipment_delivery_date of this TransportationDetails.  # noqa: E501
        :rtype: datetime
        """
        return self._shipment_delivery_date

    @shipment_delivery_date.setter
    def shipment_delivery_date(self, shipment_delivery_date):
        """Sets the shipment_delivery_date of this TransportationDetails.

        Date on which shipment will be delivered from Vendor to Buyer  # noqa: E501

        :param shipment_delivery_date: The shipment_delivery_date of this TransportationDetails.  # noqa: E501
        :type: datetime
        """

        self._shipment_delivery_date = shipment_delivery_date

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


        :return: The carrier_details of this TransportationDetails.  # noqa: E501
        :rtype: CarrierDetails
        """
        return self._carrier_details

    @carrier_details.setter
    def carrier_details(self, carrier_details):
        """Sets the carrier_details of this TransportationDetails.


        :param carrier_details: The carrier_details of this TransportationDetails.  # noqa: E501
        :type: CarrierDetails
        """

        self._carrier_details = carrier_details

    @property
    def bill_of_lading_number(self):
        """Gets the bill_of_lading_number of this TransportationDetails.  # 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 TransportationDetails.  # 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 TransportationDetails.

        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 TransportationDetails.  # 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(TransportationDetails, 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, TransportationDetails):
            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, TransportationDetails):
            return True

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