# coding: utf-8

"""
    ThingsBoard REST API

    For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: info@thingsboard.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class DeviceProfileAlarm(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 = {
        'alarm_type': 'str',
        'clear_rule': 'AlarmRule',
        'create_rules': 'dict(str, AlarmRule)',
        'id': 'str',
        'propagate': 'bool',
        'propagate_relation_types': 'list[str]'
    }

    attribute_map = {
        'alarm_type': 'alarmType',
        'clear_rule': 'clearRule',
        'create_rules': 'createRules',
        'id': 'id',
        'propagate': 'propagate',
        'propagate_relation_types': 'propagateRelationTypes'
    }

    def __init__(self, alarm_type=None, clear_rule=None, create_rules=None, id=None, propagate=None, propagate_relation_types=None):  # noqa: E501
        """DeviceProfileAlarm - a model defined in Swagger"""  # noqa: E501
        self._alarm_type = None
        self._clear_rule = None
        self._create_rules = None
        self._id = None
        self._propagate = None
        self._propagate_relation_types = None
        self.discriminator = None
        if alarm_type is not None:
            self.alarm_type = alarm_type
        if clear_rule is not None:
            self.clear_rule = clear_rule
        if create_rules is not None:
            self.create_rules = create_rules
        if id is not None:
            self.id = id
        if propagate is not None:
            self.propagate = propagate
        if propagate_relation_types is not None:
            self.propagate_relation_types = propagate_relation_types

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


        :return: The alarm_type of this DeviceProfileAlarm.  # noqa: E501
        :rtype: str
        """
        return self._alarm_type

    @alarm_type.setter
    def alarm_type(self, alarm_type):
        """Sets the alarm_type of this DeviceProfileAlarm.


        :param alarm_type: The alarm_type of this DeviceProfileAlarm.  # noqa: E501
        :type: str
        """

        self._alarm_type = alarm_type

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


        :return: The clear_rule of this DeviceProfileAlarm.  # noqa: E501
        :rtype: AlarmRule
        """
        return self._clear_rule

    @clear_rule.setter
    def clear_rule(self, clear_rule):
        """Sets the clear_rule of this DeviceProfileAlarm.


        :param clear_rule: The clear_rule of this DeviceProfileAlarm.  # noqa: E501
        :type: AlarmRule
        """

        self._clear_rule = clear_rule

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


        :return: The create_rules of this DeviceProfileAlarm.  # noqa: E501
        :rtype: dict(str, AlarmRule)
        """
        return self._create_rules

    @create_rules.setter
    def create_rules(self, create_rules):
        """Sets the create_rules of this DeviceProfileAlarm.


        :param create_rules: The create_rules of this DeviceProfileAlarm.  # noqa: E501
        :type: dict(str, AlarmRule)
        """

        self._create_rules = create_rules

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


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

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


        :param id: The id of this DeviceProfileAlarm.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The propagate of this DeviceProfileAlarm.  # noqa: E501
        :rtype: bool
        """
        return self._propagate

    @propagate.setter
    def propagate(self, propagate):
        """Sets the propagate of this DeviceProfileAlarm.


        :param propagate: The propagate of this DeviceProfileAlarm.  # noqa: E501
        :type: bool
        """

        self._propagate = propagate

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


        :return: The propagate_relation_types of this DeviceProfileAlarm.  # noqa: E501
        :rtype: list[str]
        """
        return self._propagate_relation_types

    @propagate_relation_types.setter
    def propagate_relation_types(self, propagate_relation_types):
        """Sets the propagate_relation_types of this DeviceProfileAlarm.


        :param propagate_relation_types: The propagate_relation_types of this DeviceProfileAlarm.  # noqa: E501
        :type: list[str]
        """

        self._propagate_relation_types = propagate_relation_types

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

        for attr, _ in six.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
        if issubclass(DeviceProfileAlarm, dict):
            for key, value in self.items():
                result[key] = 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, DeviceProfileAlarm):
            return False

        return self.__dict__ == other.__dict__

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