# coding: utf-8

"""
    Selling Partner APIs for Fulfillment Outbound

    The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.

    The version of the OpenAPI document: 2020-07-01
    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 FulfillmentShipmentPackage(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 = {
        'package_number': 'int',
        'carrier_code': 'str',
        'tracking_number': 'str',
        'estimated_arrival_date': 'datetime',
        'locker_details': 'LockerDetails',
        'delivery_information': 'DeliveryInformation',
    }

    attribute_map = {
        'package_number': 'packageNumber',
        'carrier_code': 'carrierCode',
        'tracking_number': 'trackingNumber',
        'estimated_arrival_date': 'estimatedArrivalDate',
        'locker_details': 'lockerDetails',
        'delivery_information': 'deliveryInformation',
    }

    def __init__(self, package_number=None, carrier_code=None, tracking_number=None, estimated_arrival_date=None, locker_details=None, delivery_information=None, _configuration=None):  # noqa: E501
        """FulfillmentShipmentPackage - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._package_number = None
        self._carrier_code = None
        self._tracking_number = None
        self._estimated_arrival_date = None
        self._locker_details = None
        self._delivery_information = None
        self.discriminator = None

        self.package_number = package_number
        self.carrier_code = carrier_code
        if tracking_number is not None:
            self.tracking_number = tracking_number
        if estimated_arrival_date is not None:
            self.estimated_arrival_date = estimated_arrival_date
        if locker_details is not None:
            self.locker_details = locker_details
        if delivery_information is not None:
            self.delivery_information = delivery_information

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

        Identifies a package in a shipment.  # noqa: E501

        :return: The package_number of this FulfillmentShipmentPackage.  # noqa: E501
        :rtype: int
        """
        return self._package_number

    @package_number.setter
    def package_number(self, package_number):
        """Sets the package_number of this FulfillmentShipmentPackage.

        Identifies a package in a shipment.  # noqa: E501

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

        self._package_number = package_number

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

        Identifies the carrier who will deliver the shipment to the recipient.  # noqa: E501

        :return: The carrier_code of this FulfillmentShipmentPackage.  # noqa: E501
        :rtype: str
        """
        return self._carrier_code

    @carrier_code.setter
    def carrier_code(self, carrier_code):
        """Sets the carrier_code of this FulfillmentShipmentPackage.

        Identifies the carrier who will deliver the shipment to the recipient.  # noqa: E501

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

        self._carrier_code = carrier_code

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

        The tracking number, if provided, can be used to obtain tracking and delivery information.  # noqa: E501

        :return: The tracking_number of this FulfillmentShipmentPackage.  # noqa: E501
        :rtype: str
        """
        return self._tracking_number

    @tracking_number.setter
    def tracking_number(self, tracking_number):
        """Sets the tracking_number of this FulfillmentShipmentPackage.

        The tracking number, if provided, can be used to obtain tracking and delivery information.  # noqa: E501

        :param tracking_number: The tracking_number of this FulfillmentShipmentPackage.  # noqa: E501
        :type: str
        """

        self._tracking_number = tracking_number

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

        Date timestamp  # noqa: E501

        :return: The estimated_arrival_date of this FulfillmentShipmentPackage.  # noqa: E501
        :rtype: datetime
        """
        return self._estimated_arrival_date

    @estimated_arrival_date.setter
    def estimated_arrival_date(self, estimated_arrival_date):
        """Sets the estimated_arrival_date of this FulfillmentShipmentPackage.

        Date timestamp  # noqa: E501

        :param estimated_arrival_date: The estimated_arrival_date of this FulfillmentShipmentPackage.  # noqa: E501
        :type: datetime
        """

        self._estimated_arrival_date = estimated_arrival_date

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


        :return: The locker_details of this FulfillmentShipmentPackage.  # noqa: E501
        :rtype: LockerDetails
        """
        return self._locker_details

    @locker_details.setter
    def locker_details(self, locker_details):
        """Sets the locker_details of this FulfillmentShipmentPackage.


        :param locker_details: The locker_details of this FulfillmentShipmentPackage.  # noqa: E501
        :type: LockerDetails
        """

        self._locker_details = locker_details

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


        :return: The delivery_information of this FulfillmentShipmentPackage.  # noqa: E501
        :rtype: DeliveryInformation
        """
        return self._delivery_information

    @delivery_information.setter
    def delivery_information(self, delivery_information):
        """Sets the delivery_information of this FulfillmentShipmentPackage.


        :param delivery_information: The delivery_information of this FulfillmentShipmentPackage.  # noqa: E501
        :type: DeliveryInformation
        """

        self._delivery_information = delivery_information

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

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