# coding: utf-8

"""
    Selling Partner API for Listings Items

    The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API.  For more information, see the [Listings Items API Use Case Guide](doc:listings-items-api-v2021-08-01-use-case-guide).  # noqa: E501

    OpenAPI spec version: 2021-08-01
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from src.api_models.listings_api.swagger_client.configuration import Configuration


class ItemSummaryByMarketplace(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 = {
        'marketplace_id': 'str',
        'asin': 'str',
        'product_type': 'str',
        'condition_type': 'str',
        'status': 'list[str]',
        'fn_sku': 'str',
        'item_name': 'str',
        'created_date': 'datetime',
        'last_updated_date': 'datetime',
        'main_image': 'ItemImage'
    }

    attribute_map = {
        'marketplace_id': 'marketplaceId',
        'asin': 'asin',
        'product_type': 'productType',
        'condition_type': 'conditionType',
        'status': 'status',
        'fn_sku': 'fnSku',
        'item_name': 'itemName',
        'created_date': 'createdDate',
        'last_updated_date': 'lastUpdatedDate',
        'main_image': 'mainImage'
    }

    def __init__(self, marketplace_id=None, asin=None, product_type=None, condition_type=None, status=None, fn_sku=None, item_name=None, created_date=None, last_updated_date=None, main_image=None, _configuration=None):  # noqa: E501
        """ItemSummaryByMarketplace - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._marketplace_id = None
        self._asin = None
        self._product_type = None
        self._condition_type = None
        self._status = None
        self._fn_sku = None
        self._item_name = None
        self._created_date = None
        self._last_updated_date = None
        self._main_image = None
        self.discriminator = None

        self.marketplace_id = marketplace_id
        self.asin = asin
        self.product_type = product_type
        if condition_type is not None:
            self.condition_type = condition_type
        self.status = status
        if fn_sku is not None:
            self.fn_sku = fn_sku
        self.item_name = item_name
        self.created_date = created_date
        self.last_updated_date = last_updated_date
        if main_image is not None:
            self.main_image = main_image

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

        A marketplace identifier. Identifies the Amazon marketplace for the listings item.  # noqa: E501

        :return: The marketplace_id of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: str
        """
        return self._marketplace_id

    @marketplace_id.setter
    def marketplace_id(self, marketplace_id):
        """Sets the marketplace_id of this ItemSummaryByMarketplace.

        A marketplace identifier. Identifies the Amazon marketplace for the listings item.  # noqa: E501

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

        self._marketplace_id = marketplace_id

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

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

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

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

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

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

        self._asin = asin

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

        The Amazon product type of the listings item.  # noqa: E501

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

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

        The Amazon product type of the listings item.  # noqa: E501

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

        self._product_type = product_type

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

        Identifies the condition of the listings item.  # noqa: E501

        :return: The condition_type of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: str
        """
        return self._condition_type

    @condition_type.setter
    def condition_type(self, condition_type):
        """Sets the condition_type of this ItemSummaryByMarketplace.

        Identifies the condition of the listings item.  # noqa: E501

        :param condition_type: The condition_type of this ItemSummaryByMarketplace.  # noqa: E501
        :type: str
        """
        allowed_values = ["new_new", "new_open_box", "new_oem", "refurbished_refurbished", "used_like_new", "used_very_good", "used_good", "used_acceptable", "collectible_like_new", "collectible_very_good", "collectible_good", "collectible_acceptable", "club_club"]  # noqa: E501
        if (self._configuration.client_side_validation and
                condition_type not in allowed_values):
            raise ValueError(
                "Invalid value for `condition_type` ({0}), must be one of {1}"  # noqa: E501
                .format(condition_type, allowed_values)
            )

        self._condition_type = condition_type

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

        Statuses that apply to the listings item.  # noqa: E501

        :return: The status of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: list[str]
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ItemSummaryByMarketplace.

        Statuses that apply to the listings item.  # noqa: E501

        :param status: The status of this ItemSummaryByMarketplace.  # noqa: E501
        :type: list[str]
        """
        if self._configuration.client_side_validation and status is None:
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        allowed_values = ["BUYABLE", "DISCOVERABLE"]  # noqa: E501
        if (self._configuration.client_side_validation and
                not set(status).issubset(set(allowed_values))):  # noqa: E501
            raise ValueError(
                "Invalid values for `status` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(status) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._status = status

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

        Fulfillment network stock keeping unit is an identifier used by Amazon fulfillment centers to identify each unique item.  # noqa: E501

        :return: The fn_sku of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: str
        """
        return self._fn_sku

    @fn_sku.setter
    def fn_sku(self, fn_sku):
        """Sets the fn_sku of this ItemSummaryByMarketplace.

        Fulfillment network stock keeping unit is an identifier used by Amazon fulfillment centers to identify each unique item.  # noqa: E501

        :param fn_sku: The fn_sku of this ItemSummaryByMarketplace.  # noqa: E501
        :type: str
        """

        self._fn_sku = fn_sku

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

        Name, or title, associated with an Amazon catalog item.  # noqa: E501

        :return: The item_name of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: str
        """
        return self._item_name

    @item_name.setter
    def item_name(self, item_name):
        """Sets the item_name of this ItemSummaryByMarketplace.

        Name, or title, associated with an Amazon catalog item.  # noqa: E501

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

        self._item_name = item_name

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

        Date the listings item was created, in ISO 8601 format.  # noqa: E501

        :return: The created_date of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: datetime
        """
        return self._created_date

    @created_date.setter
    def created_date(self, created_date):
        """Sets the created_date of this ItemSummaryByMarketplace.

        Date the listings item was created, in ISO 8601 format.  # noqa: E501

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

        self._created_date = created_date

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

        Date the listings item was last updated, in ISO 8601 format.  # noqa: E501

        :return: The last_updated_date of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: datetime
        """
        return self._last_updated_date

    @last_updated_date.setter
    def last_updated_date(self, last_updated_date):
        """Sets the last_updated_date of this ItemSummaryByMarketplace.

        Date the listings item was last updated, in ISO 8601 format.  # noqa: E501

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

        self._last_updated_date = last_updated_date

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

        Main image for the listings item.  # noqa: E501

        :return: The main_image of this ItemSummaryByMarketplace.  # noqa: E501
        :rtype: ItemImage
        """
        return self._main_image

    @main_image.setter
    def main_image(self, main_image):
        """Sets the main_image of this ItemSummaryByMarketplace.

        Main image for the listings item.  # noqa: E501

        :param main_image: The main_image of this ItemSummaryByMarketplace.  # noqa: E501
        :type: ItemImage
        """

        self._main_image = main_image

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

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