# coding: utf-8

"""
    Selling Partner API for Pricing

    The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer information for Amazon Marketplace products.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

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


class OfferType(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 = {
        'offer_type': 'OfferCustomerType',
        'buying_price': 'PriceType',
        'regular_price': 'MoneyType',
        'business_price': 'MoneyType',
        'quantity_discount_prices': 'list[QuantityDiscountPriceType]',
        'fulfillment_channel': 'str',
        'item_condition': 'str',
        'item_sub_condition': 'str',
        'seller_sku': 'str'
    }

    attribute_map = {
        'offer_type': 'offerType',
        'buying_price': 'BuyingPrice',
        'regular_price': 'RegularPrice',
        'business_price': 'businessPrice',
        'quantity_discount_prices': 'quantityDiscountPrices',
        'fulfillment_channel': 'FulfillmentChannel',
        'item_condition': 'ItemCondition',
        'item_sub_condition': 'ItemSubCondition',
        'seller_sku': 'SellerSKU'
    }

    def __init__(self, offer_type=None, buying_price=None, regular_price=None, business_price=None, quantity_discount_prices=None, fulfillment_channel=None, item_condition=None, item_sub_condition=None, seller_sku=None, _configuration=None):  # noqa: E501
        """OfferType - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._offer_type = None
        self._buying_price = None
        self._regular_price = None
        self._business_price = None
        self._quantity_discount_prices = None
        self._fulfillment_channel = None
        self._item_condition = None
        self._item_sub_condition = None
        self._seller_sku = None
        self.discriminator = None

        if offer_type is not None:
            self.offer_type = offer_type
        self.buying_price = buying_price
        self.regular_price = regular_price
        if business_price is not None:
            self.business_price = business_price
        if quantity_discount_prices is not None:
            self.quantity_discount_prices = quantity_discount_prices
        self.fulfillment_channel = fulfillment_channel
        self.item_condition = item_condition
        self.item_sub_condition = item_sub_condition
        self.seller_sku = seller_sku

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

        Indicates the type of customer that the offer is valid for.  # noqa: E501

        :return: The offer_type of this OfferType.  # noqa: E501
        :rtype: OfferCustomerType
        """
        return self._offer_type

    @offer_type.setter
    def offer_type(self, offer_type):
        """Sets the offer_type of this OfferType.

        Indicates the type of customer that the offer is valid for.  # noqa: E501

        :param offer_type: The offer_type of this OfferType.  # noqa: E501
        :type: OfferCustomerType
        """

        self._offer_type = offer_type

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

        Contains pricing information that includes promotions and contains the shipping cost.  # noqa: E501

        :return: The buying_price of this OfferType.  # noqa: E501
        :rtype: PriceType
        """
        return self._buying_price

    @buying_price.setter
    def buying_price(self, buying_price):
        """Sets the buying_price of this OfferType.

        Contains pricing information that includes promotions and contains the shipping cost.  # noqa: E501

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

        self._buying_price = buying_price

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

        The current price excluding any promotions that apply to the product. Excludes the shipping cost.  # noqa: E501

        :return: The regular_price of this OfferType.  # noqa: E501
        :rtype: MoneyType
        """
        return self._regular_price

    @regular_price.setter
    def regular_price(self, regular_price):
        """Sets the regular_price of this OfferType.

        The current price excluding any promotions that apply to the product. Excludes the shipping cost.  # noqa: E501

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

        self._regular_price = regular_price

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

        The current listing price for Business buyers.  # noqa: E501

        :return: The business_price of this OfferType.  # noqa: E501
        :rtype: MoneyType
        """
        return self._business_price

    @business_price.setter
    def business_price(self, business_price):
        """Sets the business_price of this OfferType.

        The current listing price for Business buyers.  # noqa: E501

        :param business_price: The business_price of this OfferType.  # noqa: E501
        :type: MoneyType
        """

        self._business_price = business_price

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


        :return: The quantity_discount_prices of this OfferType.  # noqa: E501
        :rtype: list[QuantityDiscountPriceType]
        """
        return self._quantity_discount_prices

    @quantity_discount_prices.setter
    def quantity_discount_prices(self, quantity_discount_prices):
        """Sets the quantity_discount_prices of this OfferType.


        :param quantity_discount_prices: The quantity_discount_prices of this OfferType.  # noqa: E501
        :type: list[QuantityDiscountPriceType]
        """

        self._quantity_discount_prices = quantity_discount_prices

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

        The fulfillment channel for the offer listing. Possible values:  * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller.  # noqa: E501

        :return: The fulfillment_channel of this OfferType.  # noqa: E501
        :rtype: str
        """
        return self._fulfillment_channel

    @fulfillment_channel.setter
    def fulfillment_channel(self, fulfillment_channel):
        """Sets the fulfillment_channel of this OfferType.

        The fulfillment channel for the offer listing. Possible values:  * Amazon - Fulfilled by Amazon. * Merchant - Fulfilled by the seller.  # noqa: E501

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

        self._fulfillment_channel = fulfillment_channel

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

        The item condition for the offer listing. Possible values: New, Used, Collectible, Refurbished, or Club.  # noqa: E501

        :return: The item_condition of this OfferType.  # noqa: E501
        :rtype: str
        """
        return self._item_condition

    @item_condition.setter
    def item_condition(self, item_condition):
        """Sets the item_condition of this OfferType.

        The item condition for the offer listing. Possible values: New, Used, Collectible, Refurbished, or Club.  # noqa: E501

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

        self._item_condition = item_condition

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

        The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.  # noqa: E501

        :return: The item_sub_condition of this OfferType.  # noqa: E501
        :rtype: str
        """
        return self._item_sub_condition

    @item_sub_condition.setter
    def item_sub_condition(self, item_sub_condition):
        """Sets the item_sub_condition of this OfferType.

        The item subcondition for the offer listing. Possible values: New, Mint, Very Good, Good, Acceptable, Poor, Club, OEM, Warranty, Refurbished Warranty, Refurbished, Open Box, or Other.  # noqa: E501

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

        self._item_sub_condition = item_sub_condition

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

        The seller stock keeping unit (SKU) of the item.  # noqa: E501

        :return: The seller_sku of this OfferType.  # noqa: E501
        :rtype: str
        """
        return self._seller_sku

    @seller_sku.setter
    def seller_sku(self, seller_sku):
        """Sets the seller_sku of this OfferType.

        The seller stock keeping unit (SKU) of the item.  # noqa: E501

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

        self._seller_sku = seller_sku

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

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