# coding: utf-8

"""
    Selling Partner API for Direct Fulfillment Shipping

    Use the Selling Partner API for Direct Fulfillment Shipping to access a direct fulfillment vendor's shipping data.

    The version of the OpenAPI document: 2021-12-28
    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 ShipmentDetails(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 = {
        'shipped_date': 'datetime',
        'shipment_status': 'str',
        'is_priority_shipment': 'bool',
        'vendor_order_number': 'str',
        'estimated_delivery_date': 'datetime',
    }

    attribute_map = {
        'shipped_date': 'shippedDate',
        'shipment_status': 'shipmentStatus',
        'is_priority_shipment': 'isPriorityShipment',
        'vendor_order_number': 'vendorOrderNumber',
        'estimated_delivery_date': 'estimatedDeliveryDate',
    }

    def __init__(self, shipped_date=None, shipment_status=None, is_priority_shipment=None, vendor_order_number=None, estimated_delivery_date=None, _configuration=None):  # noqa: E501
        """ShipmentDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._shipped_date = None
        self._shipment_status = None
        self._is_priority_shipment = None
        self._vendor_order_number = None
        self._estimated_delivery_date = None
        self.discriminator = None

        self.shipped_date = shipped_date
        self.shipment_status = shipment_status
        if is_priority_shipment is not None:
            self.is_priority_shipment = is_priority_shipment
        if vendor_order_number is not None:
            self.vendor_order_number = vendor_order_number
        if estimated_delivery_date is not None:
            self.estimated_delivery_date = estimated_delivery_date

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

        The date of the shipment's departure from vendor's location. Vendors send ASNs within 30 minutes of departure from their warehouse/distribution center or six hours prior to the appointment time at the Amazon destination warehouse. The shipped date mentioned in the shipment confirmation cannot be in the future.  # noqa: E501

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

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

        The date of the shipment's departure from vendor's location. Vendors send ASNs within 30 minutes of departure from their warehouse/distribution center or six hours prior to the appointment time at the Amazon destination warehouse. The shipped date mentioned in the shipment confirmation cannot be in the future.  # noqa: E501

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

        self._shipped_date = shipped_date

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

        The shipment status.  # noqa: E501

        :return: The shipment_status of this ShipmentDetails.  # noqa: E501
        :rtype: str
        """
        return self._shipment_status

    @shipment_status.setter
    def shipment_status(self, shipment_status):
        """Sets the shipment_status of this ShipmentDetails.

        The shipment status.  # noqa: E501

        :param shipment_status: The shipment_status of this ShipmentDetails.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and shipment_status is None:
            raise ValueError("Invalid value for `shipment_status`, must not be `None`")  # noqa: E501
        allowed_values = ["SHIPPED", "FLOOR_DENIAL"]  # noqa: E501
        if (self._configuration.client_side_validation and
                shipment_status not in allowed_values):
            raise ValueError(
                "Invalid value for `shipment_status` ({0}), must be one of {1}"  # noqa: E501
                .format(shipment_status, allowed_values)
            )

        self._shipment_status = shipment_status

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

        Provide the priority of the shipment.  # noqa: E501

        :return: The is_priority_shipment of this ShipmentDetails.  # noqa: E501
        :rtype: bool
        """
        return self._is_priority_shipment

    @is_priority_shipment.setter
    def is_priority_shipment(self, is_priority_shipment):
        """Sets the is_priority_shipment of this ShipmentDetails.

        Provide the priority of the shipment.  # noqa: E501

        :param is_priority_shipment: The is_priority_shipment of this ShipmentDetails.  # noqa: E501
        :type: bool
        """

        self._is_priority_shipment = is_priority_shipment

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

        The vendor order number is a unique identifier generated by a vendor for their reference.  # noqa: E501

        :return: The vendor_order_number of this ShipmentDetails.  # noqa: E501
        :rtype: str
        """
        return self._vendor_order_number

    @vendor_order_number.setter
    def vendor_order_number(self, vendor_order_number):
        """Sets the vendor_order_number of this ShipmentDetails.

        The vendor order number is a unique identifier generated by a vendor for their reference.  # noqa: E501

        :param vendor_order_number: The vendor_order_number of this ShipmentDetails.  # noqa: E501
        :type: str
        """

        self._vendor_order_number = vendor_order_number

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

        The date on which the shipment is expected to reach the buyer's warehouse. The date is estimated based on the average transit time between the ship-from location and the destination. Usually, the exact appointment time is unknown when creating the shipment confirmation and is later provided by the buyer.  # noqa: E501

        :return: The estimated_delivery_date of this ShipmentDetails.  # 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 ShipmentDetails.

        The date on which the shipment is expected to reach the buyer's warehouse. The date is estimated based on the average transit time between the ship-from location and the destination. Usually, the exact appointment time is unknown when creating the shipment confirmation and is later provided by the buyer.  # noqa: E501

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

        self._estimated_delivery_date = estimated_delivery_date

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

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