# coding: utf-8

"""
Copyright 2015 SmartBear Software

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    Ref: https://github.com/swagger-api/swagger-codegen
"""

from pprint import pformat
from six import iteritems


class VariableCategory(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        VariableCategory - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'id': 'int',
            'name': 'str',
            'filling_value': 'float',
            'maximum_allowed_value': 'float',
            'minimum_allowed_value': 'float',
            'duration_of_action': 'int',
            'onset_delay': 'int',
            'combination_operation': 'str',
            'updated': 'int',
            'cause_only': 'bool',
            'public': 'int',
            'outcome': 'bool',
            'created_at': 'datetime',
            'updated_at': 'datetime',
            'image_url': 'str',
            'default_unit_id': 'int'
        }

        self.attribute_map = {
            'id': 'id',
            'name': 'name',
            'filling_value': 'filling_value',
            'maximum_allowed_value': 'maximum_allowed_value',
            'minimum_allowed_value': 'minimum_allowed_value',
            'duration_of_action': 'duration_of_action',
            'onset_delay': 'onset_delay',
            'combination_operation': 'combination_operation',
            'updated': 'updated',
            'cause_only': 'cause_only',
            'public': 'public',
            'outcome': 'outcome',
            'created_at': 'created_at',
            'updated_at': 'updated_at',
            'image_url': 'image_url',
            'default_unit_id': 'default_unit_id'
        }

        self._id = None
        self._name = None
        self._filling_value = None
        self._maximum_allowed_value = None
        self._minimum_allowed_value = None
        self._duration_of_action = None
        self._onset_delay = None
        self._combination_operation = None
        self._updated = None
        self._cause_only = None
        self._public = None
        self._outcome = None
        self._created_at = None
        self._updated_at = None
        self._image_url = None
        self._default_unit_id = None

    @property
    def id(self):
        """
        Gets the id of this VariableCategory.
        id

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

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

        :param id: The id of this VariableCategory.
        :type: int
        """
        self._id = id

    @property
    def name(self):
        """
        Gets the name of this VariableCategory.
        Name of the category

        :return: The name of this VariableCategory.
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """
        Sets the name of this VariableCategory.
        Name of the category

        :param name: The name of this VariableCategory.
        :type: str
        """
        self._name = name

    @property
    def filling_value(self):
        """
        Gets the filling_value of this VariableCategory.
        Value for replacing null measurements

        :return: The filling_value of this VariableCategory.
        :rtype: float
        """
        return self._filling_value

    @filling_value.setter
    def filling_value(self, filling_value):
        """
        Sets the filling_value of this VariableCategory.
        Value for replacing null measurements

        :param filling_value: The filling_value of this VariableCategory.
        :type: float
        """
        self._filling_value = filling_value

    @property
    def maximum_allowed_value(self):
        """
        Gets the maximum_allowed_value of this VariableCategory.
        Maximum recorded value of this category

        :return: The maximum_allowed_value of this VariableCategory.
        :rtype: float
        """
        return self._maximum_allowed_value

    @maximum_allowed_value.setter
    def maximum_allowed_value(self, maximum_allowed_value):
        """
        Sets the maximum_allowed_value of this VariableCategory.
        Maximum recorded value of this category

        :param maximum_allowed_value: The maximum_allowed_value of this VariableCategory.
        :type: float
        """
        self._maximum_allowed_value = maximum_allowed_value

    @property
    def minimum_allowed_value(self):
        """
        Gets the minimum_allowed_value of this VariableCategory.
        Minimum recorded value of this category

        :return: The minimum_allowed_value of this VariableCategory.
        :rtype: float
        """
        return self._minimum_allowed_value

    @minimum_allowed_value.setter
    def minimum_allowed_value(self, minimum_allowed_value):
        """
        Sets the minimum_allowed_value of this VariableCategory.
        Minimum recorded value of this category

        :param minimum_allowed_value: The minimum_allowed_value of this VariableCategory.
        :type: float
        """
        self._minimum_allowed_value = minimum_allowed_value

    @property
    def duration_of_action(self):
        """
        Gets the duration_of_action of this VariableCategory.
        How long the effect of a measurement in this variable lasts

        :return: The duration_of_action of this VariableCategory.
        :rtype: int
        """
        return self._duration_of_action

    @duration_of_action.setter
    def duration_of_action(self, duration_of_action):
        """
        Sets the duration_of_action of this VariableCategory.
        How long the effect of a measurement in this variable lasts

        :param duration_of_action: The duration_of_action of this VariableCategory.
        :type: int
        """
        self._duration_of_action = duration_of_action

    @property
    def onset_delay(self):
        """
        Gets the onset_delay of this VariableCategory.
        How long it takes for a measurement in this variable to take effect

        :return: The onset_delay of this VariableCategory.
        :rtype: int
        """
        return self._onset_delay

    @onset_delay.setter
    def onset_delay(self, onset_delay):
        """
        Sets the onset_delay of this VariableCategory.
        How long it takes for a measurement in this variable to take effect

        :param onset_delay: The onset_delay of this VariableCategory.
        :type: int
        """
        self._onset_delay = onset_delay

    @property
    def combination_operation(self):
        """
        Gets the combination_operation of this VariableCategory.
        How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean

        :return: The combination_operation of this VariableCategory.
        :rtype: str
        """
        return self._combination_operation

    @combination_operation.setter
    def combination_operation(self, combination_operation):
        """
        Sets the combination_operation of this VariableCategory.
        How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean

        :param combination_operation: The combination_operation of this VariableCategory.
        :type: str
        """
        self._combination_operation = combination_operation

    @property
    def updated(self):
        """
        Gets the updated of this VariableCategory.
        updated

        :return: The updated of this VariableCategory.
        :rtype: int
        """
        return self._updated

    @updated.setter
    def updated(self, updated):
        """
        Sets the updated of this VariableCategory.
        updated

        :param updated: The updated of this VariableCategory.
        :type: int
        """
        self._updated = updated

    @property
    def cause_only(self):
        """
        Gets the cause_only of this VariableCategory.
        A value of 1 indicates that this category is generally a cause in a causal relationship.  An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user

        :return: The cause_only of this VariableCategory.
        :rtype: bool
        """
        return self._cause_only

    @cause_only.setter
    def cause_only(self, cause_only):
        """
        Sets the cause_only of this VariableCategory.
        A value of 1 indicates that this category is generally a cause in a causal relationship.  An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user

        :param cause_only: The cause_only of this VariableCategory.
        :type: bool
        """
        self._cause_only = cause_only

    @property
    def public(self):
        """
        Gets the public of this VariableCategory.
        Is category public

        :return: The public of this VariableCategory.
        :rtype: int
        """
        return self._public

    @public.setter
    def public(self, public):
        """
        Sets the public of this VariableCategory.
        Is category public

        :param public: The public of this VariableCategory.
        :type: int
        """
        self._public = public

    @property
    def outcome(self):
        """
        Gets the outcome of this VariableCategory.
        outcome

        :return: The outcome of this VariableCategory.
        :rtype: bool
        """
        return self._outcome

    @outcome.setter
    def outcome(self, outcome):
        """
        Sets the outcome of this VariableCategory.
        outcome

        :param outcome: The outcome of this VariableCategory.
        :type: bool
        """
        self._outcome = outcome

    @property
    def created_at(self):
        """
        Gets the created_at of this VariableCategory.
        created_at

        :return: The created_at of this VariableCategory.
        :rtype: datetime
        """
        return self._created_at

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

        :param created_at: The created_at of this VariableCategory.
        :type: datetime
        """
        self._created_at = created_at

    @property
    def updated_at(self):
        """
        Gets the updated_at of this VariableCategory.
        updated_at

        :return: The updated_at of this VariableCategory.
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """
        Sets the updated_at of this VariableCategory.
        updated_at

        :param updated_at: The updated_at of this VariableCategory.
        :type: datetime
        """
        self._updated_at = updated_at

    @property
    def image_url(self):
        """
        Gets the image_url of this VariableCategory.
        Image URL

        :return: The image_url of this VariableCategory.
        :rtype: str
        """
        return self._image_url

    @image_url.setter
    def image_url(self, image_url):
        """
        Sets the image_url of this VariableCategory.
        Image URL

        :param image_url: The image_url of this VariableCategory.
        :type: str
        """
        self._image_url = image_url

    @property
    def default_unit_id(self):
        """
        Gets the default_unit_id of this VariableCategory.
        ID of the default unit for the category

        :return: The default_unit_id of this VariableCategory.
        :rtype: int
        """
        return self._default_unit_id

    @default_unit_id.setter
    def default_unit_id(self, default_unit_id):
        """
        Sets the default_unit_id of this VariableCategory.
        ID of the default unit for the category

        :param default_unit_id: The default_unit_id of this VariableCategory.
        :type: int
        """
        self._default_unit_id = default_unit_id

    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()
            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()
