# 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 ChallengeActivityResource(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 = {
        'activity_id': 'int',
        'additional_properties': 'dict(str, ModelProperty)',
        'challenge_id': 'int',
        'core_settings': 'CoreChallengeActivitySettings',
        'entitlement': 'ActivityEntitlementResource',
        'id': 'int',
        'reward_set': 'RewardSetResource',
        'settings': 'list[SelectedSettingResource]',
        'template': 'str'
    }

    attribute_map = {
        'activity_id': 'activity_id',
        'additional_properties': 'additional_properties',
        'challenge_id': 'challenge_id',
        'core_settings': 'core_settings',
        'entitlement': 'entitlement',
        'id': 'id',
        'reward_set': 'reward_set',
        'settings': 'settings',
        'template': 'template'
    }

    def __init__(self, activity_id=None, additional_properties=None, challenge_id=None, core_settings=None, entitlement=None, id=None, reward_set=None, settings=None, template=None):
        """
        ChallengeActivityResource - a model defined in Swagger
        """

        self._activity_id = None
        self._additional_properties = None
        self._challenge_id = None
        self._core_settings = None
        self._entitlement = None
        self._id = None
        self._reward_set = None
        self._settings = None
        self._template = None
        self.discriminator = None

        self.activity_id = activity_id
        if additional_properties is not None:
          self.additional_properties = additional_properties
        if challenge_id is not None:
          self.challenge_id = challenge_id
        if core_settings is not None:
          self.core_settings = core_settings
        if entitlement is not None:
          self.entitlement = entitlement
        if id is not None:
          self.id = id
        if reward_set is not None:
          self.reward_set = reward_set
        if settings is not None:
          self.settings = settings
        if template is not None:
          self.template = template

    @property
    def activity_id(self):
        """
        Gets the activity_id of this ChallengeActivityResource.
        The id of the activity

        :return: The activity_id of this ChallengeActivityResource.
        :rtype: int
        """
        return self._activity_id

    @activity_id.setter
    def activity_id(self, activity_id):
        """
        Sets the activity_id of this ChallengeActivityResource.
        The id of the activity

        :param activity_id: The activity_id of this ChallengeActivityResource.
        :type: int
        """
        if activity_id is None:
            raise ValueError("Invalid value for `activity_id`, must not be `None`")

        self._activity_id = activity_id

    @property
    def additional_properties(self):
        """
        Gets the additional_properties of this ChallengeActivityResource.
        A map of additional properties, keyed on the property name.  Must match the names and types defined in the template for this item type

        :return: The additional_properties of this ChallengeActivityResource.
        :rtype: dict(str, ModelProperty)
        """
        return self._additional_properties

    @additional_properties.setter
    def additional_properties(self, additional_properties):
        """
        Sets the additional_properties of this ChallengeActivityResource.
        A map of additional properties, keyed on the property name.  Must match the names and types defined in the template for this item type

        :param additional_properties: The additional_properties of this ChallengeActivityResource.
        :type: dict(str, ModelProperty)
        """

        self._additional_properties = additional_properties

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

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

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

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

        self._challenge_id = challenge_id

    @property
    def core_settings(self):
        """
        Gets the core_settings of this ChallengeActivityResource.
        Defines core settings about the activity that affect how it can be created/played by users. Values may be left null to inherit from parent activity.

        :return: The core_settings of this ChallengeActivityResource.
        :rtype: CoreChallengeActivitySettings
        """
        return self._core_settings

    @core_settings.setter
    def core_settings(self, core_settings):
        """
        Sets the core_settings of this ChallengeActivityResource.
        Defines core settings about the activity that affect how it can be created/played by users. Values may be left null to inherit from parent activity.

        :param core_settings: The core_settings of this ChallengeActivityResource.
        :type: CoreChallengeActivitySettings
        """

        self._core_settings = core_settings

    @property
    def entitlement(self):
        """
        Gets the entitlement of this ChallengeActivityResource.
        The entitlement item needed to participate in the activity as part of this event. Null indicates free entry. When creating/updating only id is used. Item must be pre-existing

        :return: The entitlement of this ChallengeActivityResource.
        :rtype: ActivityEntitlementResource
        """
        return self._entitlement

    @entitlement.setter
    def entitlement(self, entitlement):
        """
        Sets the entitlement of this ChallengeActivityResource.
        The entitlement item needed to participate in the activity as part of this event. Null indicates free entry. When creating/updating only id is used. Item must be pre-existing

        :param entitlement: The entitlement of this ChallengeActivityResource.
        :type: ActivityEntitlementResource
        """

        self._entitlement = entitlement

    @property
    def id(self):
        """
        Gets the id of this ChallengeActivityResource.
        The unique ID for this resource

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

    @id.setter
    def id(self, id):
        """
        Sets the id of this ChallengeActivityResource.
        The unique ID for this resource

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

        self._id = id

    @property
    def reward_set(self):
        """
        Gets the reward_set of this ChallengeActivityResource.
        The rewards to give at the end of each occurence of the activity. When creating/updating only id is used. Reward set must be pre-existing

        :return: The reward_set of this ChallengeActivityResource.
        :rtype: RewardSetResource
        """
        return self._reward_set

    @reward_set.setter
    def reward_set(self, reward_set):
        """
        Sets the reward_set of this ChallengeActivityResource.
        The rewards to give at the end of each occurence of the activity. When creating/updating only id is used. Reward set must be pre-existing

        :param reward_set: The reward_set of this ChallengeActivityResource.
        :type: RewardSetResource
        """

        self._reward_set = reward_set

    @property
    def settings(self):
        """
        Gets the settings of this ChallengeActivityResource.
        The list of settings and the select options

        :return: The settings of this ChallengeActivityResource.
        :rtype: list[SelectedSettingResource]
        """
        return self._settings

    @settings.setter
    def settings(self, settings):
        """
        Sets the settings of this ChallengeActivityResource.
        The list of settings and the select options

        :param settings: The settings of this ChallengeActivityResource.
        :type: list[SelectedSettingResource]
        """

        self._settings = settings

    @property
    def template(self):
        """
        Gets the template of this ChallengeActivityResource.
        A challenge activity template this challenge activity is validated against (private). May be null and no validation of additional_properties will be done

        :return: The template of this ChallengeActivityResource.
        :rtype: str
        """
        return self._template

    @template.setter
    def template(self, template):
        """
        Sets the template of this ChallengeActivityResource.
        A challenge activity template this challenge activity is validated against (private). May be null and no validation of additional_properties will be done

        :param template: The template of this ChallengeActivityResource.
        :type: str
        """

        self._template = template

    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, ChallengeActivityResource):
            return False

        return self.__dict__ == other.__dict__

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