# coding: utf-8

"""
    Allegro REST API

    https://developer.allegro.pl/about  # noqa: E501

    The version of the OpenAPI document: 2020.03.10
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from allegro_api.configuration import Configuration


class OfferSellingMode(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'format': 'SellingModeFormat',
        'price': 'OfferPrice',
        'fixed_price': 'OfferFixedPrice',
        'popularity': 'int',
        'bid_count': 'int'
    }

    attribute_map = {
        'format': 'format',
        'price': 'price',
        'fixed_price': 'fixedPrice',
        'popularity': 'popularity',
        'bid_count': 'bidCount'
    }

    def __init__(self, format=None, price=None, fixed_price=None, popularity=None, bid_count=None, local_vars_configuration=None):  # noqa: E501
        """OfferSellingMode - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._format = None
        self._price = None
        self._fixed_price = None
        self._popularity = None
        self._bid_count = None
        self.discriminator = None

        if format is not None:
            self.format = format
        if price is not None:
            self.price = price
        if fixed_price is not None:
            self.fixed_price = fixed_price
        if popularity is not None:
            self.popularity = popularity
        if bid_count is not None:
            self.bid_count = bid_count

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


        :return: The format of this OfferSellingMode.  # noqa: E501
        :rtype: SellingModeFormat
        """
        return self._format

    @format.setter
    def format(self, format):
        """Sets the format of this OfferSellingMode.


        :param format: The format of this OfferSellingMode.  # noqa: E501
        :type: SellingModeFormat
        """

        self._format = format

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


        :return: The price of this OfferSellingMode.  # noqa: E501
        :rtype: OfferPrice
        """
        return self._price

    @price.setter
    def price(self, price):
        """Sets the price of this OfferSellingMode.


        :param price: The price of this OfferSellingMode.  # noqa: E501
        :type: OfferPrice
        """

        self._price = price

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


        :return: The fixed_price of this OfferSellingMode.  # noqa: E501
        :rtype: OfferFixedPrice
        """
        return self._fixed_price

    @fixed_price.setter
    def fixed_price(self, fixed_price):
        """Sets the fixed_price of this OfferSellingMode.


        :param fixed_price: The fixed_price of this OfferSellingMode.  # noqa: E501
        :type: OfferFixedPrice
        """

        self._fixed_price = fixed_price

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

        Popularity of the offer for *BUY_NOW* selling format.  # noqa: E501

        :return: The popularity of this OfferSellingMode.  # noqa: E501
        :rtype: int
        """
        return self._popularity

    @popularity.setter
    def popularity(self, popularity):
        """Sets the popularity of this OfferSellingMode.

        Popularity of the offer for *BUY_NOW* selling format.  # noqa: E501

        :param popularity: The popularity of this OfferSellingMode.  # noqa: E501
        :type: int
        """

        self._popularity = popularity

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

        Number of bidders for *AUCTION* selling format.  # noqa: E501

        :return: The bid_count of this OfferSellingMode.  # noqa: E501
        :rtype: int
        """
        return self._bid_count

    @bid_count.setter
    def bid_count(self, bid_count):
        """Sets the bid_count of this OfferSellingMode.

        Number of bidders for *AUCTION* selling format.  # noqa: E501

        :param bid_count: The bid_count of this OfferSellingMode.  # noqa: E501
        :type: int
        """

        self._bid_count = bid_count

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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