# 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 ShipmentInformation(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 = {
        'vendor_details': 'VendorDetails',
        'buyer_reference_number': 'str',
        'ship_to_party': 'PartyIdentification',
        'ship_from_party': 'PartyIdentification',
        'warehouse_id': 'str',
        'master_tracking_id': 'str',
        'total_label_count': 'int',
        'ship_mode': 'str',
    }

    attribute_map = {
        'vendor_details': 'vendorDetails',
        'buyer_reference_number': 'buyerReferenceNumber',
        'ship_to_party': 'shipToParty',
        'ship_from_party': 'shipFromParty',
        'warehouse_id': 'warehouseId',
        'master_tracking_id': 'masterTrackingId',
        'total_label_count': 'totalLabelCount',
        'ship_mode': 'shipMode',
    }

    def __init__(self, vendor_details=None, buyer_reference_number=None, ship_to_party=None, ship_from_party=None, warehouse_id=None, master_tracking_id=None, total_label_count=None, ship_mode=None, _configuration=None):  # noqa: E501
        """ShipmentInformation - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._vendor_details = None
        self._buyer_reference_number = None
        self._ship_to_party = None
        self._ship_from_party = None
        self._warehouse_id = None
        self._master_tracking_id = None
        self._total_label_count = None
        self._ship_mode = None
        self.discriminator = None

        if vendor_details is not None:
            self.vendor_details = vendor_details
        if buyer_reference_number is not None:
            self.buyer_reference_number = buyer_reference_number
        if ship_to_party is not None:
            self.ship_to_party = ship_to_party
        if ship_from_party is not None:
            self.ship_from_party = ship_from_party
        if warehouse_id is not None:
            self.warehouse_id = warehouse_id
        if master_tracking_id is not None:
            self.master_tracking_id = master_tracking_id
        if total_label_count is not None:
            self.total_label_count = total_label_count
        if ship_mode is not None:
            self.ship_mode = ship_mode

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


        :return: The vendor_details of this ShipmentInformation.  # noqa: E501
        :rtype: VendorDetails
        """
        return self._vendor_details

    @vendor_details.setter
    def vendor_details(self, vendor_details):
        """Sets the vendor_details of this ShipmentInformation.


        :param vendor_details: The vendor_details of this ShipmentInformation.  # noqa: E501
        :type: VendorDetails
        """

        self._vendor_details = vendor_details

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

        The buyer reference number is a unique identifier generated by the buyer for all Collect and WePay shipments.  # noqa: E501

        :return: The buyer_reference_number of this ShipmentInformation.  # noqa: E501
        :rtype: str
        """
        return self._buyer_reference_number

    @buyer_reference_number.setter
    def buyer_reference_number(self, buyer_reference_number):
        """Sets the buyer_reference_number of this ShipmentInformation.

        The buyer reference number is a unique identifier generated by the buyer for all Collect and WePay shipments.  # noqa: E501

        :param buyer_reference_number: The buyer_reference_number of this ShipmentInformation.  # noqa: E501
        :type: str
        """

        self._buyer_reference_number = buyer_reference_number

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


        :return: The ship_to_party of this ShipmentInformation.  # noqa: E501
        :rtype: PartyIdentification
        """
        return self._ship_to_party

    @ship_to_party.setter
    def ship_to_party(self, ship_to_party):
        """Sets the ship_to_party of this ShipmentInformation.


        :param ship_to_party: The ship_to_party of this ShipmentInformation.  # noqa: E501
        :type: PartyIdentification
        """

        self._ship_to_party = ship_to_party

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


        :return: The ship_from_party of this ShipmentInformation.  # noqa: E501
        :rtype: PartyIdentification
        """
        return self._ship_from_party

    @ship_from_party.setter
    def ship_from_party(self, ship_from_party):
        """Sets the ship_from_party of this ShipmentInformation.


        :param ship_from_party: The ship_from_party of this ShipmentInformation.  # noqa: E501
        :type: PartyIdentification
        """

        self._ship_from_party = ship_from_party

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

        Vendor Warehouse ID from where the shipment is scheduled to be picked up by buyer / Carrier.  # noqa: E501

        :return: The warehouse_id of this ShipmentInformation.  # noqa: E501
        :rtype: str
        """
        return self._warehouse_id

    @warehouse_id.setter
    def warehouse_id(self, warehouse_id):
        """Sets the warehouse_id of this ShipmentInformation.

        Vendor Warehouse ID from where the shipment is scheduled to be picked up by buyer / Carrier.  # noqa: E501

        :param warehouse_id: The warehouse_id of this ShipmentInformation.  # noqa: E501
        :type: str
        """

        self._warehouse_id = warehouse_id

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

        Unique Id with  which  the shipment can be tracked for Small Parcels.  # noqa: E501

        :return: The master_tracking_id of this ShipmentInformation.  # noqa: E501
        :rtype: str
        """
        return self._master_tracking_id

    @master_tracking_id.setter
    def master_tracking_id(self, master_tracking_id):
        """Sets the master_tracking_id of this ShipmentInformation.

        Unique Id with  which  the shipment can be tracked for Small Parcels.  # noqa: E501

        :param master_tracking_id: The master_tracking_id of this ShipmentInformation.  # noqa: E501
        :type: str
        """

        self._master_tracking_id = master_tracking_id

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

        Number of Labels that are created as part of this shipment.  # noqa: E501

        :return: The total_label_count of this ShipmentInformation.  # noqa: E501
        :rtype: int
        """
        return self._total_label_count

    @total_label_count.setter
    def total_label_count(self, total_label_count):
        """Sets the total_label_count of this ShipmentInformation.

        Number of Labels that are created as part of this shipment.  # noqa: E501

        :param total_label_count: The total_label_count of this ShipmentInformation.  # noqa: E501
        :type: int
        """

        self._total_label_count = total_label_count

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

        Type of shipment whether it is Small Parcel  # noqa: E501

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

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

        Type of shipment whether it is Small Parcel  # noqa: E501

        :param ship_mode: The ship_mode of this ShipmentInformation.  # noqa: E501
        :type: str
        """
        allowed_values = ["SmallParcel", "LTL"]  # 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

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

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