# coding: utf-8

"""
    Selling Partner API for Pricing

    The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products.  For more information, refer to the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).

    The version of the OpenAPI document: 2022-05-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 Offer(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 = {
        'seller_id': 'str',
        'condition': 'Condition',
        'sub_condition': 'str',
        'fulfillment_type': 'FulfillmentType',
        'listing_price': 'MoneyType',
        'shipping_options': 'List[ShippingOption]',
        'points': 'Points',
        'prime_details': 'PrimeDetails',
    }

    attribute_map = {
        'seller_id': 'sellerId',
        'condition': 'condition',
        'sub_condition': 'subCondition',
        'fulfillment_type': 'fulfillmentType',
        'listing_price': 'listingPrice',
        'shipping_options': 'shippingOptions',
        'points': 'points',
        'prime_details': 'primeDetails',
    }

    def __init__(self, seller_id=None, condition=None, sub_condition=None, fulfillment_type=None, listing_price=None, shipping_options=None, points=None, prime_details=None, _configuration=None):  # noqa: E501
        """Offer - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._seller_id = None
        self._condition = None
        self._sub_condition = None
        self._fulfillment_type = None
        self._listing_price = None
        self._shipping_options = None
        self._points = None
        self._prime_details = None
        self.discriminator = None

        self.seller_id = seller_id
        self.condition = condition
        if sub_condition is not None:
            self.sub_condition = sub_condition
        self.fulfillment_type = fulfillment_type
        self.listing_price = listing_price
        if shipping_options is not None:
            self.shipping_options = shipping_options
        if points is not None:
            self.points = points
        if prime_details is not None:
            self.prime_details = prime_details

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

        The seller identifier for the offer.  # noqa: E501

        :return: The seller_id of this Offer.  # noqa: E501
        :rtype: str
        """
        return self._seller_id

    @seller_id.setter
    def seller_id(self, seller_id):
        """Sets the seller_id of this Offer.

        The seller identifier for the offer.  # noqa: E501

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

        self._seller_id = seller_id

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


        :return: The condition of this Offer.  # noqa: E501
        :rtype: Condition
        """
        return self._condition

    @condition.setter
    def condition(self, condition):
        """Sets the condition of this Offer.


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

        self._condition = condition

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

        The item subcondition of the offer.  # noqa: E501

        :return: The sub_condition of this Offer.  # noqa: E501
        :rtype: str
        """
        return self._sub_condition

    @sub_condition.setter
    def sub_condition(self, sub_condition):
        """Sets the sub_condition of this Offer.

        The item subcondition of the offer.  # noqa: E501

        :param sub_condition: The sub_condition of this Offer.  # noqa: E501
        :type: str
        """
        allowed_values = ["New", "Mint", "VeryGood", "Good", "Acceptable", "Poor", "Club", "OEM", "Warranty", "RefurbishedWarranty", "Refurbished", "OpenBox", "Other"]  # noqa: E501
        if (self._configuration.client_side_validation and
                sub_condition not in allowed_values):
            raise ValueError(
                "Invalid value for `sub_condition` ({0}), must be one of {1}"  # noqa: E501
                .format(sub_condition, allowed_values)
            )

        self._sub_condition = sub_condition

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


        :return: The fulfillment_type of this Offer.  # noqa: E501
        :rtype: FulfillmentType
        """
        return self._fulfillment_type

    @fulfillment_type.setter
    def fulfillment_type(self, fulfillment_type):
        """Sets the fulfillment_type of this Offer.


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

        self._fulfillment_type = fulfillment_type

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


        :return: The listing_price of this Offer.  # noqa: E501
        :rtype: MoneyType
        """
        return self._listing_price

    @listing_price.setter
    def listing_price(self, listing_price):
        """Sets the listing_price of this Offer.


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

        self._listing_price = listing_price

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

        A list of shipping options associated with this offer  # noqa: E501

        :return: The shipping_options of this Offer.  # noqa: E501
        :rtype: List[ShippingOption]
        """
        return self._shipping_options

    @shipping_options.setter
    def shipping_options(self, shipping_options):
        """Sets the shipping_options of this Offer.

        A list of shipping options associated with this offer  # noqa: E501

        :param shipping_options: The shipping_options of this Offer.  # noqa: E501
        :type: List[ShippingOption]
        """

        self._shipping_options = shipping_options

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


        :return: The points of this Offer.  # noqa: E501
        :rtype: Points
        """
        return self._points

    @points.setter
    def points(self, points):
        """Sets the points of this Offer.


        :param points: The points of this Offer.  # noqa: E501
        :type: Points
        """

        self._points = points

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


        :return: The prime_details of this Offer.  # noqa: E501
        :rtype: PrimeDetails
        """
        return self._prime_details

    @prime_details.setter
    def prime_details(self, prime_details):
        """Sets the prime_details of this Offer.


        :param prime_details: The prime_details of this Offer.  # noqa: E501
        :type: PrimeDetails
        """

        self._prime_details = prime_details

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

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