# coding: utf-8

"""
    Netilion API Documentation

    Welcome to the Netilion API Documentation, which provides interactive access and documentation to our REST API. Please visit our developer portal for further instructions and information: https://developer.netilion.endress.com/   # noqa: E501

    OpenAPI spec version: 01.00.00
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class HealthConditionExtendedRules(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 = {
        'type': 'str',
        'bit': 'int',
        'start_bit': 'int',
        'end_bit': 'int',
        'value': 'int'
    }

    attribute_map = {
        'type': 'type',
        'bit': 'bit',
        'start_bit': 'start_bit',
        'end_bit': 'end_bit',
        'value': 'value'
    }

    def __init__(self, type=None, bit=None, start_bit=None, end_bit=None, value=None):  # noqa: E501
        """HealthConditionExtendedRules - a model defined in Swagger"""  # noqa: E501
        self._type = None
        self._bit = None
        self._start_bit = None
        self._end_bit = None
        self._value = None
        self.discriminator = None
        self.type = type
        if bit is not None:
            self.bit = bit
        if start_bit is not None:
            self.start_bit = start_bit
        if end_bit is not None:
            self.end_bit = end_bit
        if value is not None:
            self.value = value

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

        type of the rule, possible values are 'bit', 'bitarea' and 'channel'  # noqa: E501

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

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

        type of the rule, possible values are 'bit', 'bitarea' and 'channel'  # noqa: E501

        :param type: The type of this HealthConditionExtendedRules.  # noqa: E501
        :type: str
        """
        if type is None:
            raise ValueError("Invalid value for `type`, must not be `None`")  # noqa: E501

        self._type = type

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


        :return: The bit of this HealthConditionExtendedRules.  # noqa: E501
        :rtype: int
        """
        return self._bit

    @bit.setter
    def bit(self, bit):
        """Sets the bit of this HealthConditionExtendedRules.


        :param bit: The bit of this HealthConditionExtendedRules.  # noqa: E501
        :type: int
        """

        self._bit = bit

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


        :return: The start_bit of this HealthConditionExtendedRules.  # noqa: E501
        :rtype: int
        """
        return self._start_bit

    @start_bit.setter
    def start_bit(self, start_bit):
        """Sets the start_bit of this HealthConditionExtendedRules.


        :param start_bit: The start_bit of this HealthConditionExtendedRules.  # noqa: E501
        :type: int
        """

        self._start_bit = start_bit

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


        :return: The end_bit of this HealthConditionExtendedRules.  # noqa: E501
        :rtype: int
        """
        return self._end_bit

    @end_bit.setter
    def end_bit(self, end_bit):
        """Sets the end_bit of this HealthConditionExtendedRules.


        :param end_bit: The end_bit of this HealthConditionExtendedRules.  # noqa: E501
        :type: int
        """

        self._end_bit = end_bit

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


        :return: The value of this HealthConditionExtendedRules.  # noqa: E501
        :rtype: int
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this HealthConditionExtendedRules.


        :param value: The value of this HealthConditionExtendedRules.  # noqa: E501
        :type: int
        """

        self._value = value

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

        return self.__dict__ == other.__dict__

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