# 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 SellerRebateDto(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 = {
        'benefits': 'list[Benefit]',
        'created_at': 'datetime',
        'id': 'str',
        'offer_criteria': 'list[SellerRebateOfferCriterion]',
        'status': 'str'
    }

    attribute_map = {
        'benefits': 'benefits',
        'created_at': 'createdAt',
        'id': 'id',
        'offer_criteria': 'offerCriteria',
        'status': 'status'
    }

    def __init__(self, benefits=None, created_at=None, id=None, offer_criteria=None, status=None, local_vars_configuration=None):  # noqa: E501
        """SellerRebateDto - 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._benefits = None
        self._created_at = None
        self._id = None
        self._offer_criteria = None
        self._status = None
        self.discriminator = None

        self.benefits = benefits
        if created_at is not None:
            self.created_at = created_at
        self.id = id
        self.offer_criteria = offer_criteria
        self.status = status

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

        What kind of rebate will be given  # noqa: E501

        :return: The benefits of this SellerRebateDto.  # noqa: E501
        :rtype: list[Benefit]
        """
        return self._benefits

    @benefits.setter
    def benefits(self, benefits):
        """Sets the benefits of this SellerRebateDto.

        What kind of rebate will be given  # noqa: E501

        :param benefits: The benefits of this SellerRebateDto.  # noqa: E501
        :type: list[Benefit]
        """
        if self.local_vars_configuration.client_side_validation and benefits is None:  # noqa: E501
            raise ValueError("Invalid value for `benefits`, must not be `None`")  # noqa: E501

        self._benefits = benefits

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

        when was this rebate created  # noqa: E501

        :return: The created_at of this SellerRebateDto.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this SellerRebateDto.

        when was this rebate created  # noqa: E501

        :param created_at: The created_at of this SellerRebateDto.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        Rebate identifier  # noqa: E501

        :return: The id of this SellerRebateDto.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this SellerRebateDto.

        Rebate identifier  # noqa: E501

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

        self._id = id

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

        What offers will be included  # noqa: E501

        :return: The offer_criteria of this SellerRebateDto.  # noqa: E501
        :rtype: list[SellerRebateOfferCriterion]
        """
        return self._offer_criteria

    @offer_criteria.setter
    def offer_criteria(self, offer_criteria):
        """Sets the offer_criteria of this SellerRebateDto.

        What offers will be included  # noqa: E501

        :param offer_criteria: The offer_criteria of this SellerRebateDto.  # noqa: E501
        :type: list[SellerRebateOfferCriterion]
        """
        if self.local_vars_configuration.client_side_validation and offer_criteria is None:  # noqa: E501
            raise ValueError("Invalid value for `offer_criteria`, must not be `None`")  # noqa: E501

        self._offer_criteria = offer_criteria

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


        :return: The status of this SellerRebateDto.  # noqa: E501
        :rtype: str
        """
        return self._status

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


        :param status: The status of this SellerRebateDto.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        allowed_values = ["ACTIVE", "INACTIVE", "SUSPENDED"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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

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