# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class ChallengeEventResource(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 = {
        'challenge_id': 'int',
        'end_date': 'int',
        'id': 'int',
        'reward_status': 'str',
        'start_date': 'int'
    }

    attribute_map = {
        'challenge_id': 'challenge_id',
        'end_date': 'end_date',
        'id': 'id',
        'reward_status': 'reward_status',
        'start_date': 'start_date'
    }

    def __init__(self, challenge_id=None, end_date=None, id=None, reward_status=None, start_date=None):
        """
        ChallengeEventResource - a model defined in Swagger
        """

        self._challenge_id = None
        self._end_date = None
        self._id = None
        self._reward_status = None
        self._start_date = None
        self.discriminator = None

        if challenge_id is not None:
          self.challenge_id = challenge_id
        if end_date is not None:
          self.end_date = end_date
        if id is not None:
          self.id = id
        if reward_status is not None:
          self.reward_status = reward_status
        if start_date is not None:
          self.start_date = start_date

    @property
    def challenge_id(self):
        """
        Gets the challenge_id of this ChallengeEventResource.
        The id of the challenge

        :return: The challenge_id of this ChallengeEventResource.
        :rtype: int
        """
        return self._challenge_id

    @challenge_id.setter
    def challenge_id(self, challenge_id):
        """
        Sets the challenge_id of this ChallengeEventResource.
        The id of the challenge

        :param challenge_id: The challenge_id of this ChallengeEventResource.
        :type: int
        """

        self._challenge_id = challenge_id

    @property
    def end_date(self):
        """
        Gets the end_date of this ChallengeEventResource.
        The end date in seconds

        :return: The end_date of this ChallengeEventResource.
        :rtype: int
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """
        Sets the end_date of this ChallengeEventResource.
        The end date in seconds

        :param end_date: The end_date of this ChallengeEventResource.
        :type: int
        """

        self._end_date = end_date

    @property
    def id(self):
        """
        Gets the id of this ChallengeEventResource.
        The id of the challenge event

        :return: The id of this ChallengeEventResource.
        :rtype: int
        """
        return self._id

    @id.setter
    def id(self, id):
        """
        Sets the id of this ChallengeEventResource.
        The id of the challenge event

        :param id: The id of this ChallengeEventResource.
        :type: int
        """

        self._id = id

    @property
    def reward_status(self):
        """
        Gets the reward_status of this ChallengeEventResource.
        Indicate if the rewards have been given out already 

        :return: The reward_status of this ChallengeEventResource.
        :rtype: str
        """
        return self._reward_status

    @reward_status.setter
    def reward_status(self, reward_status):
        """
        Sets the reward_status of this ChallengeEventResource.
        Indicate if the rewards have been given out already 

        :param reward_status: The reward_status of this ChallengeEventResource.
        :type: str
        """
        allowed_values = ["pending", "failed", "complete", "partial"]
        if reward_status not in allowed_values:
            raise ValueError(
                "Invalid value for `reward_status` ({0}), must be one of {1}"
                .format(reward_status, allowed_values)
            )

        self._reward_status = reward_status

    @property
    def start_date(self):
        """
        Gets the start_date of this ChallengeEventResource.
        The start date in seconds

        :return: The start_date of this ChallengeEventResource.
        :rtype: int
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """
        Sets the start_date of this ChallengeEventResource.
        The start date in seconds

        :param start_date: The start_date of this ChallengeEventResource.
        :type: int
        """

        self._start_date = start_date

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, ChallengeEventResource):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other
