# coding: utf-8

"""
    The Selling Partner API for Amazon Warehousing and Distribution

    The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.

    The version of the OpenAPI document: 2024-05-09
    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 InboundShipment(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_code': 'CarrierCode',
        'created_at': 'datetime',
        'destination_address': 'Address',
        'external_reference_id': 'str',
        'order_id': 'str',
        'origin_address': 'Address',
        'received_quantity': 'List[InventoryQuantity]',
        'ship_by': 'datetime',
        'shipment_container_quantities': 'List[DistributionPackageQuantity]',
        'shipment_id': 'str',
        'shipment_sku_quantities': 'List[SkuQuantity]',
        'destination_region': 'str',
        'shipment_status': 'InboundShipmentStatus',
        'tracking_id': 'str',
        'updated_at': 'datetime',
        'warehouse_reference_id': 'str',
    }

    attribute_map = {
        'carrier_code': 'carrierCode',
        'created_at': 'createdAt',
        'destination_address': 'destinationAddress',
        'external_reference_id': 'externalReferenceId',
        'order_id': 'orderId',
        'origin_address': 'originAddress',
        'received_quantity': 'receivedQuantity',
        'ship_by': 'shipBy',
        'shipment_container_quantities': 'shipmentContainerQuantities',
        'shipment_id': 'shipmentId',
        'shipment_sku_quantities': 'shipmentSkuQuantities',
        'destination_region': 'destinationRegion',
        'shipment_status': 'shipmentStatus',
        'tracking_id': 'trackingId',
        'updated_at': 'updatedAt',
        'warehouse_reference_id': 'warehouseReferenceId',
    }

    def __init__(self, carrier_code=None, created_at=None, destination_address=None, external_reference_id=None, order_id=None, origin_address=None, received_quantity=None, ship_by=None, shipment_container_quantities=None, shipment_id=None, shipment_sku_quantities=None, destination_region=None, shipment_status=None, tracking_id=None, updated_at=None, warehouse_reference_id=None, _configuration=None):  # noqa: E501
        """InboundShipment - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._carrier_code = None
        self._created_at = None
        self._destination_address = None
        self._external_reference_id = None
        self._order_id = None
        self._origin_address = None
        self._received_quantity = None
        self._ship_by = None
        self._shipment_container_quantities = None
        self._shipment_id = None
        self._shipment_sku_quantities = None
        self._destination_region = None
        self._shipment_status = None
        self._tracking_id = None
        self._updated_at = None
        self._warehouse_reference_id = None
        self.discriminator = None

        if carrier_code is not None:
            self.carrier_code = carrier_code
        if created_at is not None:
            self.created_at = created_at
        self.destination_address = destination_address
        if external_reference_id is not None:
            self.external_reference_id = external_reference_id
        self.order_id = order_id
        self.origin_address = origin_address
        if received_quantity is not None:
            self.received_quantity = received_quantity
        if ship_by is not None:
            self.ship_by = ship_by
        self.shipment_container_quantities = shipment_container_quantities
        self.shipment_id = shipment_id
        if shipment_sku_quantities is not None:
            self.shipment_sku_quantities = shipment_sku_quantities
        if destination_region is not None:
            self.destination_region = destination_region
        self.shipment_status = shipment_status
        if tracking_id is not None:
            self.tracking_id = tracking_id
        if updated_at is not None:
            self.updated_at = updated_at
        if warehouse_reference_id is not None:
            self.warehouse_reference_id = warehouse_reference_id

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


        :return: The carrier_code of this InboundShipment.  # noqa: E501
        :rtype: CarrierCode
        """
        return self._carrier_code

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


        :param carrier_code: The carrier_code of this InboundShipment.  # noqa: E501
        :type: CarrierCode
        """

        self._carrier_code = carrier_code

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

        Timestamp when the shipment was created. The date is returned in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.  # noqa: E501

        :return: The created_at of this InboundShipment.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this InboundShipment.

        Timestamp when the shipment was created. The date is returned in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.  # noqa: E501

        :param created_at: The created_at of this InboundShipment.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The destination_address of this InboundShipment.  # noqa: E501
        :rtype: Address
        """
        return self._destination_address

    @destination_address.setter
    def destination_address(self, destination_address):
        """Sets the destination_address of this InboundShipment.


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

        self._destination_address = destination_address

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

        Client-provided reference ID that can correlate this shipment to client resources. For example, to map this shipment to an internal bookkeeping order record.  # noqa: E501

        :return: The external_reference_id of this InboundShipment.  # noqa: E501
        :rtype: str
        """
        return self._external_reference_id

    @external_reference_id.setter
    def external_reference_id(self, external_reference_id):
        """Sets the external_reference_id of this InboundShipment.

        Client-provided reference ID that can correlate this shipment to client resources. For example, to map this shipment to an internal bookkeeping order record.  # noqa: E501

        :param external_reference_id: The external_reference_id of this InboundShipment.  # noqa: E501
        :type: str
        """

        self._external_reference_id = external_reference_id

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

        The AWD inbound order ID that this inbound shipment belongs to.  # noqa: E501

        :return: The order_id of this InboundShipment.  # noqa: E501
        :rtype: str
        """
        return self._order_id

    @order_id.setter
    def order_id(self, order_id):
        """Sets the order_id of this InboundShipment.

        The AWD inbound order ID that this inbound shipment belongs to.  # noqa: E501

        :param order_id: The order_id of this InboundShipment.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and order_id is None:
            raise ValueError("Invalid value for `order_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                order_id is not None and len(order_id) < 1):
            raise ValueError("Invalid value for `order_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._order_id = order_id

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


        :return: The origin_address of this InboundShipment.  # noqa: E501
        :rtype: Address
        """
        return self._origin_address

    @origin_address.setter
    def origin_address(self, origin_address):
        """Sets the origin_address of this InboundShipment.


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

        self._origin_address = origin_address

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

        Quantity received (at the receiving end) as part of this shipment.  # noqa: E501

        :return: The received_quantity of this InboundShipment.  # noqa: E501
        :rtype: List[InventoryQuantity]
        """
        return self._received_quantity

    @received_quantity.setter
    def received_quantity(self, received_quantity):
        """Sets the received_quantity of this InboundShipment.

        Quantity received (at the receiving end) as part of this shipment.  # noqa: E501

        :param received_quantity: The received_quantity of this InboundShipment.  # noqa: E501
        :type: List[InventoryQuantity]
        """

        self._received_quantity = received_quantity

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

        Timestamp when the shipment will be shipped.  # noqa: E501

        :return: The ship_by of this InboundShipment.  # noqa: E501
        :rtype: datetime
        """
        return self._ship_by

    @ship_by.setter
    def ship_by(self, ship_by):
        """Sets the ship_by of this InboundShipment.

        Timestamp when the shipment will be shipped.  # noqa: E501

        :param ship_by: The ship_by of this InboundShipment.  # noqa: E501
        :type: datetime
        """

        self._ship_by = ship_by

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

        Packages that are part of this shipment.  # noqa: E501

        :return: The shipment_container_quantities of this InboundShipment.  # noqa: E501
        :rtype: List[DistributionPackageQuantity]
        """
        return self._shipment_container_quantities

    @shipment_container_quantities.setter
    def shipment_container_quantities(self, shipment_container_quantities):
        """Sets the shipment_container_quantities of this InboundShipment.

        Packages that are part of this shipment.  # noqa: E501

        :param shipment_container_quantities: The shipment_container_quantities of this InboundShipment.  # noqa: E501
        :type: List[DistributionPackageQuantity]
        """
        if self._configuration.client_side_validation and shipment_container_quantities is None:
            raise ValueError("Invalid value for `shipment_container_quantities`, must not be `None`")  # noqa: E501

        self._shipment_container_quantities = shipment_container_quantities

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

        Unique shipment ID.  # noqa: E501

        :return: The shipment_id of this InboundShipment.  # noqa: E501
        :rtype: str
        """
        return self._shipment_id

    @shipment_id.setter
    def shipment_id(self, shipment_id):
        """Sets the shipment_id of this InboundShipment.

        Unique shipment ID.  # noqa: E501

        :param shipment_id: The shipment_id of this InboundShipment.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and shipment_id is None:
            raise ValueError("Invalid value for `shipment_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                shipment_id is not None and len(shipment_id) < 1):
            raise ValueError("Invalid value for `shipment_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._shipment_id = shipment_id

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

        Quantity details at SKU level for the shipment. This attribute will only appear if the skuQuantities parameter in the request is set to SHOW.  # noqa: E501

        :return: The shipment_sku_quantities of this InboundShipment.  # noqa: E501
        :rtype: List[SkuQuantity]
        """
        return self._shipment_sku_quantities

    @shipment_sku_quantities.setter
    def shipment_sku_quantities(self, shipment_sku_quantities):
        """Sets the shipment_sku_quantities of this InboundShipment.

        Quantity details at SKU level for the shipment. This attribute will only appear if the skuQuantities parameter in the request is set to SHOW.  # noqa: E501

        :param shipment_sku_quantities: The shipment_sku_quantities of this InboundShipment.  # noqa: E501
        :type: List[SkuQuantity]
        """

        self._shipment_sku_quantities = shipment_sku_quantities

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

        Assigned region where the order will be shipped. This can differ from what was passed as preference. AWD currently supports following region IDs: [us-west, us-east, us-southcentral, us-southeast]  # noqa: E501

        :return: The destination_region of this InboundShipment.  # noqa: E501
        :rtype: str
        """
        return self._destination_region

    @destination_region.setter
    def destination_region(self, destination_region):
        """Sets the destination_region of this InboundShipment.

        Assigned region where the order will be shipped. This can differ from what was passed as preference. AWD currently supports following region IDs: [us-west, us-east, us-southcentral, us-southeast]  # noqa: E501

        :param destination_region: The destination_region of this InboundShipment.  # noqa: E501
        :type: str
        """

        self._destination_region = destination_region

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


        :return: The shipment_status of this InboundShipment.  # noqa: E501
        :rtype: InboundShipmentStatus
        """
        return self._shipment_status

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


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

        self._shipment_status = shipment_status

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

        Carrier-unique tracking ID for this shipment.  # noqa: E501

        :return: The tracking_id of this InboundShipment.  # noqa: E501
        :rtype: str
        """
        return self._tracking_id

    @tracking_id.setter
    def tracking_id(self, tracking_id):
        """Sets the tracking_id of this InboundShipment.

        Carrier-unique tracking ID for this shipment.  # noqa: E501

        :param tracking_id: The tracking_id of this InboundShipment.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                tracking_id is not None and len(tracking_id) < 1):
            raise ValueError("Invalid value for `tracking_id`, length must be greater than or equal to `1`")  # noqa: E501

        self._tracking_id = tracking_id

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

        Timestamp when the shipment was updated. The date is returned in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.  # noqa: E501

        :return: The updated_at of this InboundShipment.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this InboundShipment.

        Timestamp when the shipment was updated. The date is returned in <a href='https://developer-docs.amazon.com/sp-api/docs/iso-8601'>ISO 8601</a> format.  # noqa: E501

        :param updated_at: The updated_at of this InboundShipment.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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

        An AWD-provided reference ID that you can use to interact with the warehouse. For example, a carrier appointment booking.  # noqa: E501

        :return: The warehouse_reference_id of this InboundShipment.  # noqa: E501
        :rtype: str
        """
        return self._warehouse_reference_id

    @warehouse_reference_id.setter
    def warehouse_reference_id(self, warehouse_reference_id):
        """Sets the warehouse_reference_id of this InboundShipment.

        An AWD-provided reference ID that you can use to interact with the warehouse. For example, a carrier appointment booking.  # noqa: E501

        :param warehouse_reference_id: The warehouse_reference_id of this InboundShipment.  # noqa: E501
        :type: str
        """

        self._warehouse_reference_id = warehouse_reference_id

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

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