# coding: utf-8

"""
    Amazon Shipping API

    The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.  # noqa: E501

    OpenAPI spec version: v2
    Contact: swa-api-core@amazon.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Item(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 = {
        'item_value': 'Currency',
        'description': 'str',
        'item_identifier': 'str',
        'quantity': 'int',
        'weight': 'Weight',
        'liquid_volume': 'LiquidVolume',
        'is_hazmat': 'bool',
        'dangerous_goods_details': 'DangerousGoodsDetails',
        'product_type': 'str',
        'invoice_details': 'InvoiceDetails',
        'serial_numbers': 'list[str]',
        'direct_fulfillment_item_identifiers': 'DirectFulfillmentItemIdentifiers'
    }

    attribute_map = {
        'item_value': 'itemValue',
        'description': 'description',
        'item_identifier': 'itemIdentifier',
        'quantity': 'quantity',
        'weight': 'weight',
        'liquid_volume': 'liquidVolume',
        'is_hazmat': 'isHazmat',
        'dangerous_goods_details': 'dangerousGoodsDetails',
        'product_type': 'productType',
        'invoice_details': 'invoiceDetails',
        'serial_numbers': 'serialNumbers',
        'direct_fulfillment_item_identifiers': 'directFulfillmentItemIdentifiers'
    }

    def __init__(self, item_value=None, description=None, item_identifier=None, quantity=None, weight=None, liquid_volume=None, is_hazmat=None, dangerous_goods_details=None, product_type=None, invoice_details=None, serial_numbers=None, direct_fulfillment_item_identifiers=None):  # noqa: E501
        """Item - a model defined in Swagger"""  # noqa: E501
        self._item_value = None
        self._description = None
        self._item_identifier = None
        self._quantity = None
        self._weight = None
        self._liquid_volume = None
        self._is_hazmat = None
        self._dangerous_goods_details = None
        self._product_type = None
        self._invoice_details = None
        self._serial_numbers = None
        self._direct_fulfillment_item_identifiers = None
        self.discriminator = None
        if item_value is not None:
            self.item_value = item_value
        if description is not None:
            self.description = description
        if item_identifier is not None:
            self.item_identifier = item_identifier
        self.quantity = quantity
        if weight is not None:
            self.weight = weight
        if liquid_volume is not None:
            self.liquid_volume = liquid_volume
        if is_hazmat is not None:
            self.is_hazmat = is_hazmat
        if dangerous_goods_details is not None:
            self.dangerous_goods_details = dangerous_goods_details
        if product_type is not None:
            self.product_type = product_type
        if invoice_details is not None:
            self.invoice_details = invoice_details
        if serial_numbers is not None:
            self.serial_numbers = serial_numbers
        if direct_fulfillment_item_identifiers is not None:
            self.direct_fulfillment_item_identifiers = direct_fulfillment_item_identifiers

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


        :return: The item_value of this Item.  # noqa: E501
        :rtype: Currency
        """
        return self._item_value

    @item_value.setter
    def item_value(self, item_value):
        """Sets the item_value of this Item.


        :param item_value: The item_value of this Item.  # noqa: E501
        :type: Currency
        """

        self._item_value = item_value

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

        The product description of the item.  # noqa: E501

        :return: The description of this Item.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Item.

        The product description of the item.  # noqa: E501

        :param description: The description of this Item.  # noqa: E501
        :type: str
        """

        self._description = description

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

        A unique identifier for an item provided by the client.  # noqa: E501

        :return: The item_identifier of this Item.  # noqa: E501
        :rtype: str
        """
        return self._item_identifier

    @item_identifier.setter
    def item_identifier(self, item_identifier):
        """Sets the item_identifier of this Item.

        A unique identifier for an item provided by the client.  # noqa: E501

        :param item_identifier: The item_identifier of this Item.  # noqa: E501
        :type: str
        """

        self._item_identifier = item_identifier

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

        The number of units. This value is required.  # noqa: E501

        :return: The quantity of this Item.  # noqa: E501
        :rtype: int
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this Item.

        The number of units. This value is required.  # noqa: E501

        :param quantity: The quantity of this Item.  # noqa: E501
        :type: int
        """
        if quantity is None:
            raise ValueError("Invalid value for `quantity`, must not be `None`")  # noqa: E501

        self._quantity = quantity

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


        :return: The weight of this Item.  # noqa: E501
        :rtype: Weight
        """
        return self._weight

    @weight.setter
    def weight(self, weight):
        """Sets the weight of this Item.


        :param weight: The weight of this Item.  # noqa: E501
        :type: Weight
        """

        self._weight = weight

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


        :return: The liquid_volume of this Item.  # noqa: E501
        :rtype: LiquidVolume
        """
        return self._liquid_volume

    @liquid_volume.setter
    def liquid_volume(self, liquid_volume):
        """Sets the liquid_volume of this Item.


        :param liquid_volume: The liquid_volume of this Item.  # noqa: E501
        :type: LiquidVolume
        """

        self._liquid_volume = liquid_volume

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

        When true, the item qualifies as hazardous materials (hazmat). Defaults to false.  # noqa: E501

        :return: The is_hazmat of this Item.  # noqa: E501
        :rtype: bool
        """
        return self._is_hazmat

    @is_hazmat.setter
    def is_hazmat(self, is_hazmat):
        """Sets the is_hazmat of this Item.

        When true, the item qualifies as hazardous materials (hazmat). Defaults to false.  # noqa: E501

        :param is_hazmat: The is_hazmat of this Item.  # noqa: E501
        :type: bool
        """

        self._is_hazmat = is_hazmat

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


        :return: The dangerous_goods_details of this Item.  # noqa: E501
        :rtype: DangerousGoodsDetails
        """
        return self._dangerous_goods_details

    @dangerous_goods_details.setter
    def dangerous_goods_details(self, dangerous_goods_details):
        """Sets the dangerous_goods_details of this Item.


        :param dangerous_goods_details: The dangerous_goods_details of this Item.  # noqa: E501
        :type: DangerousGoodsDetails
        """

        self._dangerous_goods_details = dangerous_goods_details

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

        The product type of the item.  # noqa: E501

        :return: The product_type of this Item.  # noqa: E501
        :rtype: str
        """
        return self._product_type

    @product_type.setter
    def product_type(self, product_type):
        """Sets the product_type of this Item.

        The product type of the item.  # noqa: E501

        :param product_type: The product_type of this Item.  # noqa: E501
        :type: str
        """

        self._product_type = product_type

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


        :return: The invoice_details of this Item.  # noqa: E501
        :rtype: InvoiceDetails
        """
        return self._invoice_details

    @invoice_details.setter
    def invoice_details(self, invoice_details):
        """Sets the invoice_details of this Item.


        :param invoice_details: The invoice_details of this Item.  # noqa: E501
        :type: InvoiceDetails
        """

        self._invoice_details = invoice_details

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

        A list of unique serial numbers in an Amazon package that can be used to guarantee non-fraudulent items. The number of serial numbers in the list must be less than or equal to the quantity of items being shipped. Only applicable when channel source is Amazon.  # noqa: E501

        :return: The serial_numbers of this Item.  # noqa: E501
        :rtype: list[str]
        """
        return self._serial_numbers

    @serial_numbers.setter
    def serial_numbers(self, serial_numbers):
        """Sets the serial_numbers of this Item.

        A list of unique serial numbers in an Amazon package that can be used to guarantee non-fraudulent items. The number of serial numbers in the list must be less than or equal to the quantity of items being shipped. Only applicable when channel source is Amazon.  # noqa: E501

        :param serial_numbers: The serial_numbers of this Item.  # noqa: E501
        :type: list[str]
        """

        self._serial_numbers = serial_numbers

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


        :return: The direct_fulfillment_item_identifiers of this Item.  # noqa: E501
        :rtype: DirectFulfillmentItemIdentifiers
        """
        return self._direct_fulfillment_item_identifiers

    @direct_fulfillment_item_identifiers.setter
    def direct_fulfillment_item_identifiers(self, direct_fulfillment_item_identifiers):
        """Sets the direct_fulfillment_item_identifiers of this Item.


        :param direct_fulfillment_item_identifiers: The direct_fulfillment_item_identifiers of this Item.  # noqa: E501
        :type: DirectFulfillmentItemIdentifiers
        """

        self._direct_fulfillment_item_identifiers = direct_fulfillment_item_identifiers

    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(Item, 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, Item):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
