# coding: utf-8

"""
    wwtp-paas-main-bus-service

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from dhicn_wwtp_data_bus_service.configuration import Configuration


class PredictAlarmOut(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'code': 'str',
        'prediction_time': 'datetime',
        'value': 'float',
        'message': 'str',
        'detail_message': 'str',
        'unit': 'str',
        'alarm_type': 'int'
    }

    attribute_map = {
        'code': 'code',
        'prediction_time': 'predictionTime',
        'value': 'value',
        'message': 'message',
        'detail_message': 'detailMessage',
        'unit': 'unit',
        'alarm_type': 'alarmType'
    }

    def __init__(self, code=None, prediction_time=None, value=None, message=None, detail_message=None, unit=None, alarm_type=None, local_vars_configuration=None):  # noqa: E501
        """PredictAlarmOut - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._code = None
        self._prediction_time = None
        self._value = None
        self._message = None
        self._detail_message = None
        self._unit = None
        self._alarm_type = None
        self.discriminator = None

        self.code = code
        if prediction_time is not None:
            self.prediction_time = prediction_time
        if value is not None:
            self.value = value
        self.message = message
        self.detail_message = detail_message
        self.unit = unit
        if alarm_type is not None:
            self.alarm_type = alarm_type

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

        指标 indicator code  # noqa: E501

        :return: The code of this PredictAlarmOut.  # noqa: E501
        :rtype: str
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this PredictAlarmOut.

        指标 indicator code  # noqa: E501

        :param code: The code of this PredictAlarmOut.  # noqa: E501
        :type: str
        """

        self._code = code

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

        时刻 alarm time  # noqa: E501

        :return: The prediction_time of this PredictAlarmOut.  # noqa: E501
        :rtype: datetime
        """
        return self._prediction_time

    @prediction_time.setter
    def prediction_time(self, prediction_time):
        """Sets the prediction_time of this PredictAlarmOut.

        时刻 alarm time  # noqa: E501

        :param prediction_time: The prediction_time of this PredictAlarmOut.  # noqa: E501
        :type: datetime
        """

        self._prediction_time = prediction_time

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

        预测值 value  # noqa: E501

        :return: The value of this PredictAlarmOut.  # noqa: E501
        :rtype: float
        """
        return self._value

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

        预测值 value  # noqa: E501

        :param value: The value of this PredictAlarmOut.  # noqa: E501
        :type: float
        """

        self._value = value

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

        预警信息 alarm message  # noqa: E501

        :return: The message of this PredictAlarmOut.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this PredictAlarmOut.

        预警信息 alarm message  # noqa: E501

        :param message: The message of this PredictAlarmOut.  # noqa: E501
        :type: str
        """

        self._message = message

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

        详细预警信息 alarm message detail  # noqa: E501

        :return: The detail_message of this PredictAlarmOut.  # noqa: E501
        :rtype: str
        """
        return self._detail_message

    @detail_message.setter
    def detail_message(self, detail_message):
        """Sets the detail_message of this PredictAlarmOut.

        详细预警信息 alarm message detail  # noqa: E501

        :param detail_message: The detail_message of this PredictAlarmOut.  # noqa: E501
        :type: str
        """

        self._detail_message = detail_message

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

        单位 unit  # noqa: E501

        :return: The unit of this PredictAlarmOut.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this PredictAlarmOut.

        单位 unit  # noqa: E501

        :param unit: The unit of this PredictAlarmOut.  # noqa: E501
        :type: str
        """

        self._unit = unit

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

        预警类型 alarm type  # noqa: E501

        :return: The alarm_type of this PredictAlarmOut.  # noqa: E501
        :rtype: int
        """
        return self._alarm_type

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

        预警类型 alarm type  # noqa: E501

        :param alarm_type: The alarm_type of this PredictAlarmOut.  # noqa: E501
        :type: int
        """
        allowed_values = [0, 1, 2]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and alarm_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `alarm_type` ({0}), must be one of {1}"  # noqa: E501
                .format(alarm_type, allowed_values)
            )

        self._alarm_type = alarm_type

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

        for attr, _ in six.iteritems(self.openapi_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 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, PredictAlarmOut):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
