# coding: utf-8

"""
    Allegro REST API

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

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


import pprint
import re  # noqa: F401

import six

from allegro_api.configuration import Configuration


class BadgeCampaign(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 = {
        'id': 'str',
        'name': 'str',
        'type': 'str',
        'eligibility': 'UserCampaignEligibility',
        'application': 'ApplicationTimePolicy',
        'visibility': 'VisibilityTimePolicy',
        'publication': 'PublicationTimePolicy'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'type': 'type',
        'eligibility': 'eligibility',
        'application': 'application',
        'visibility': 'visibility',
        'publication': 'publication'
    }

    def __init__(self, id=None, name=None, type=None, eligibility=None, application=None, visibility=None, publication=None, local_vars_configuration=None):  # noqa: E501
        """BadgeCampaign - 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._id = None
        self._name = None
        self._type = None
        self._eligibility = None
        self._application = None
        self._visibility = None
        self._publication = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.type = type
        self.eligibility = eligibility
        self.application = application
        self.visibility = visibility
        self.publication = publication

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

        Badge campaign ID.  # noqa: E501

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

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

        Badge campaign ID.  # noqa: E501

        :param id: The id of this BadgeCampaign.  # 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 name(self):
        """Gets the name of this BadgeCampaign.  # noqa: E501

        Badge campaign name.  # noqa: E501

        :return: The name of this BadgeCampaign.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this BadgeCampaign.

        Badge campaign name.  # noqa: E501

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

        self._name = name

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


        :return: The type of this BadgeCampaign.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this BadgeCampaign.


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

        self._type = type

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


        :return: The eligibility of this BadgeCampaign.  # noqa: E501
        :rtype: UserCampaignEligibility
        """
        return self._eligibility

    @eligibility.setter
    def eligibility(self, eligibility):
        """Sets the eligibility of this BadgeCampaign.


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

        self._eligibility = eligibility

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


        :return: The application of this BadgeCampaign.  # noqa: E501
        :rtype: ApplicationTimePolicy
        """
        return self._application

    @application.setter
    def application(self, application):
        """Sets the application of this BadgeCampaign.


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

        self._application = application

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


        :return: The visibility of this BadgeCampaign.  # noqa: E501
        :rtype: VisibilityTimePolicy
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """Sets the visibility of this BadgeCampaign.


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

        self._visibility = visibility

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


        :return: The publication of this BadgeCampaign.  # noqa: E501
        :rtype: PublicationTimePolicy
        """
        return self._publication

    @publication.setter
    def publication(self, publication):
        """Sets the publication of this BadgeCampaign.


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

        self._publication = publication

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

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