# coding: utf-8

"""
    AristaFlowREST/WorklistManager

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Sensor(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 = {
        'broker': 'str',
        'topic': 'str',
        'data_type': 'str',
        'format': 'str',
        'value': 'Value',
        'process_trigger': 'ProcessTrigger'
    }

    attribute_map = {
        'broker': 'broker',
        'topic': 'topic',
        'data_type': 'dataType',
        'format': 'format',
        'value': 'value',
        'process_trigger': 'processTrigger'
    }

    def __init__(self, broker=None, topic=None, data_type=None, format=None, value=None, process_trigger=None):  # noqa: E501
        """Sensor - a model defined in Swagger"""  # noqa: E501
        self._broker = None
        self._topic = None
        self._data_type = None
        self._format = None
        self._value = None
        self._process_trigger = None
        if not(hasattr(self, "discriminator")) or not(self.discriminator):
            self.discriminator = None
        self.broker = broker
        self.topic = topic
        self.data_type = data_type
        self.format = format
        if value is not None:
            self.value = value
        if process_trigger is not None:
            self.process_trigger = process_trigger

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


        :return: The broker of this Sensor.  # noqa: E501
        :rtype: str
        """
        return self._broker

    @broker.setter
    def broker(self, broker):
        """Sets the broker of this Sensor.


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

        self._broker = broker

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


        :return: The topic of this Sensor.  # noqa: E501
        :rtype: str
        """
        return self._topic

    @topic.setter
    def topic(self, topic):
        """Sets the topic of this Sensor.


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

        self._topic = topic

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


        :return: The data_type of this Sensor.  # noqa: E501
        :rtype: str
        """
        return self._data_type

    @data_type.setter
    def data_type(self, data_type):
        """Sets the data_type of this Sensor.


        :param data_type: The data_type of this Sensor.  # noqa: E501
        :type: str
        """
        if data_type is None:
            raise ValueError("Invalid value for `data_type`, must not be `None`")  # noqa: E501
        allowed_values = ["INTEGER", "FLOAT", "STRING", "BOOLEAN", "DATE", "URI", "USERDEFINED"]  # noqa: E501
        if data_type not in allowed_values:
            raise ValueError(
                "Invalid value for `data_type` ({0}), must be one of {1}"  # noqa: E501
                .format(data_type, allowed_values)
            )

        self._data_type = data_type

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


        :return: The format of this Sensor.  # noqa: E501
        :rtype: str
        """
        return self._format

    @format.setter
    def format(self, format):
        """Sets the format of this Sensor.


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

        self._format = format

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


        :return: The value of this Sensor.  # noqa: E501
        :rtype: Value
        """
        return self._value

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


        :param value: The value of this Sensor.  # noqa: E501
        :type: Value
        """

        self._value = value

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


        :return: The process_trigger of this Sensor.  # noqa: E501
        :rtype: ProcessTrigger
        """
        return self._process_trigger

    @process_trigger.setter
    def process_trigger(self, process_trigger):
        """Sets the process_trigger of this Sensor.


        :param process_trigger: The process_trigger of this Sensor.  # noqa: E501
        :type: ProcessTrigger
        """

        self._process_trigger = process_trigger

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

        return self.__dict__ == other.__dict__

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