# coding: utf-8

"""
    Selling Partner API for Services

    With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.

    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 AssociatedItem(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 = {
        'asin': 'str',
        'title': 'str',
        'quantity': 'int',
        'order_id': 'str',
        'item_status': 'str',
        'brand_name': 'str',
        'item_delivery': 'ItemDelivery',
    }

    attribute_map = {
        'asin': 'asin',
        'title': 'title',
        'quantity': 'quantity',
        'order_id': 'orderId',
        'item_status': 'itemStatus',
        'brand_name': 'brandName',
        'item_delivery': 'itemDelivery',
    }

    def __init__(self, asin=None, title=None, quantity=None, order_id=None, item_status=None, brand_name=None, item_delivery=None, _configuration=None):  # noqa: E501
        """AssociatedItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._asin = None
        self._title = None
        self._quantity = None
        self._order_id = None
        self._item_status = None
        self._brand_name = None
        self._item_delivery = None
        self.discriminator = None

        if asin is not None:
            self.asin = asin
        if title is not None:
            self.title = title
        if quantity is not None:
            self.quantity = quantity
        if order_id is not None:
            self.order_id = order_id
        if item_status is not None:
            self.item_status = item_status
        if brand_name is not None:
            self.brand_name = brand_name
        if item_delivery is not None:
            self.item_delivery = item_delivery

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

        The Amazon Standard Identification Number (ASIN) of the item.  # noqa: E501

        :return: The asin of this AssociatedItem.  # noqa: E501
        :rtype: str
        """
        return self._asin

    @asin.setter
    def asin(self, asin):
        """Sets the asin of this AssociatedItem.

        The Amazon Standard Identification Number (ASIN) of the item.  # noqa: E501

        :param asin: The asin of this AssociatedItem.  # noqa: E501
        :type: str
        """

        self._asin = asin

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

        The title of the item.  # noqa: E501

        :return: The title of this AssociatedItem.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this AssociatedItem.

        The title of the item.  # noqa: E501

        :param title: The title of this AssociatedItem.  # noqa: E501
        :type: str
        """

        self._title = title

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

        The total number of items included in the order.  # noqa: E501

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

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

        The total number of items included in the order.  # noqa: E501

        :param quantity: The quantity of this AssociatedItem.  # noqa: E501
        :type: int
        """

        self._quantity = quantity

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

        The Amazon-defined identifier for an order placed by the buyer, in 3-7-7 format.  # noqa: E501

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

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

        The Amazon-defined identifier for an order placed by the buyer, in 3-7-7 format.  # noqa: E501

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

        self._order_id = order_id

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

        The status of the item.  # noqa: E501

        :return: The item_status of this AssociatedItem.  # noqa: E501
        :rtype: str
        """
        return self._item_status

    @item_status.setter
    def item_status(self, item_status):
        """Sets the item_status of this AssociatedItem.

        The status of the item.  # noqa: E501

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

        self._item_status = item_status

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

        The brand name of the item.  # noqa: E501

        :return: The brand_name of this AssociatedItem.  # noqa: E501
        :rtype: str
        """
        return self._brand_name

    @brand_name.setter
    def brand_name(self, brand_name):
        """Sets the brand_name of this AssociatedItem.

        The brand name of the item.  # noqa: E501

        :param brand_name: The brand_name of this AssociatedItem.  # noqa: E501
        :type: str
        """

        self._brand_name = brand_name

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


        :return: The item_delivery of this AssociatedItem.  # noqa: E501
        :rtype: ItemDelivery
        """
        return self._item_delivery

    @item_delivery.setter
    def item_delivery(self, item_delivery):
        """Sets the item_delivery of this AssociatedItem.


        :param item_delivery: The item_delivery of this AssociatedItem.  # noqa: E501
        :type: ItemDelivery
        """

        self._item_delivery = item_delivery

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

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