# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class IndicatorStatisticsResponse(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 = {
        'id': 'str',
        'name': 'str',
        'system_sort_order': 'int',
        'indicator_type': 'MetricTypeCodes',
        'measure_of': 'SensorRoleTypeCodes',
        'display_units': 'str',
        'last_measurement': 'datetime',
        'average_value': 'float',
        'max_value': 'float',
        'time_in_alarm': 'float',
        'time_in_warning': 'float',
        'on_time': 'float',
        'hierarchy': 'list[IndicatorStatisticsHierarchyChild]',
        'start_date': 'datetime',
        'end_date': 'datetime'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'system_sort_order': 'SystemSortOrder',
        'indicator_type': 'IndicatorType',
        'measure_of': 'MeasureOf',
        'display_units': 'DisplayUnits',
        'last_measurement': 'LastMeasurement',
        'average_value': 'AverageValue',
        'max_value': 'MaxValue',
        'time_in_alarm': 'TimeInAlarm',
        'time_in_warning': 'TimeInWarning',
        'on_time': 'OnTime',
        'hierarchy': 'Hierarchy',
        'start_date': 'StartDate',
        'end_date': 'EndDate'
    }

    def __init__(self, id=None, name=None, system_sort_order=None, indicator_type=None, measure_of=None, display_units=None, last_measurement=None, average_value=None, max_value=None, time_in_alarm=None, time_in_warning=None, on_time=None, hierarchy=None, start_date=None, end_date=None):  # noqa: E501
        """IndicatorStatisticsResponse - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._system_sort_order = None
        self._indicator_type = None
        self._measure_of = None
        self._display_units = None
        self._last_measurement = None
        self._average_value = None
        self._max_value = None
        self._time_in_alarm = None
        self._time_in_warning = None
        self._on_time = None
        self._hierarchy = None
        self._start_date = None
        self._end_date = None
        self.discriminator = None
        self.id = id
        self.name = name
        if system_sort_order is not None:
            self.system_sort_order = system_sort_order
        self.indicator_type = indicator_type
        if measure_of is not None:
            self.measure_of = measure_of
        if display_units is not None:
            self.display_units = display_units
        if last_measurement is not None:
            self.last_measurement = last_measurement
        if average_value is not None:
            self.average_value = average_value
        if max_value is not None:
            self.max_value = max_value
        if time_in_alarm is not None:
            self.time_in_alarm = time_in_alarm
        if time_in_warning is not None:
            self.time_in_warning = time_in_warning
        if on_time is not None:
            self.on_time = on_time
        if hierarchy is not None:
            self.hierarchy = hierarchy
        if start_date is not None:
            self.start_date = start_date
        if end_date is not None:
            self.end_date = end_date

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


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

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


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

        self._id = id

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


        :return: The name of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this IndicatorStatisticsResponse.


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

        self._name = name

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


        :return: The system_sort_order of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: int
        """
        return self._system_sort_order

    @system_sort_order.setter
    def system_sort_order(self, system_sort_order):
        """Sets the system_sort_order of this IndicatorStatisticsResponse.


        :param system_sort_order: The system_sort_order of this IndicatorStatisticsResponse.  # noqa: E501
        :type: int
        """

        self._system_sort_order = system_sort_order

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


        :return: The indicator_type of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: MetricTypeCodes
        """
        return self._indicator_type

    @indicator_type.setter
    def indicator_type(self, indicator_type):
        """Sets the indicator_type of this IndicatorStatisticsResponse.


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

        self._indicator_type = indicator_type

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


        :return: The measure_of of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: SensorRoleTypeCodes
        """
        return self._measure_of

    @measure_of.setter
    def measure_of(self, measure_of):
        """Sets the measure_of of this IndicatorStatisticsResponse.


        :param measure_of: The measure_of of this IndicatorStatisticsResponse.  # noqa: E501
        :type: SensorRoleTypeCodes
        """

        self._measure_of = measure_of

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


        :return: The display_units of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: str
        """
        return self._display_units

    @display_units.setter
    def display_units(self, display_units):
        """Sets the display_units of this IndicatorStatisticsResponse.


        :param display_units: The display_units of this IndicatorStatisticsResponse.  # noqa: E501
        :type: str
        """

        self._display_units = display_units

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


        :return: The last_measurement of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._last_measurement

    @last_measurement.setter
    def last_measurement(self, last_measurement):
        """Sets the last_measurement of this IndicatorStatisticsResponse.


        :param last_measurement: The last_measurement of this IndicatorStatisticsResponse.  # noqa: E501
        :type: datetime
        """

        self._last_measurement = last_measurement

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


        :return: The average_value of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: float
        """
        return self._average_value

    @average_value.setter
    def average_value(self, average_value):
        """Sets the average_value of this IndicatorStatisticsResponse.


        :param average_value: The average_value of this IndicatorStatisticsResponse.  # noqa: E501
        :type: float
        """

        self._average_value = average_value

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


        :return: The max_value of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: float
        """
        return self._max_value

    @max_value.setter
    def max_value(self, max_value):
        """Sets the max_value of this IndicatorStatisticsResponse.


        :param max_value: The max_value of this IndicatorStatisticsResponse.  # noqa: E501
        :type: float
        """

        self._max_value = max_value

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


        :return: The time_in_alarm of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: float
        """
        return self._time_in_alarm

    @time_in_alarm.setter
    def time_in_alarm(self, time_in_alarm):
        """Sets the time_in_alarm of this IndicatorStatisticsResponse.


        :param time_in_alarm: The time_in_alarm of this IndicatorStatisticsResponse.  # noqa: E501
        :type: float
        """

        self._time_in_alarm = time_in_alarm

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


        :return: The time_in_warning of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: float
        """
        return self._time_in_warning

    @time_in_warning.setter
    def time_in_warning(self, time_in_warning):
        """Sets the time_in_warning of this IndicatorStatisticsResponse.


        :param time_in_warning: The time_in_warning of this IndicatorStatisticsResponse.  # noqa: E501
        :type: float
        """

        self._time_in_warning = time_in_warning

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


        :return: The on_time of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: float
        """
        return self._on_time

    @on_time.setter
    def on_time(self, on_time):
        """Sets the on_time of this IndicatorStatisticsResponse.


        :param on_time: The on_time of this IndicatorStatisticsResponse.  # noqa: E501
        :type: float
        """

        self._on_time = on_time

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


        :return: The hierarchy of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: list[IndicatorStatisticsHierarchyChild]
        """
        return self._hierarchy

    @hierarchy.setter
    def hierarchy(self, hierarchy):
        """Sets the hierarchy of this IndicatorStatisticsResponse.


        :param hierarchy: The hierarchy of this IndicatorStatisticsResponse.  # noqa: E501
        :type: list[IndicatorStatisticsHierarchyChild]
        """

        self._hierarchy = hierarchy

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


        :return: The start_date of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this IndicatorStatisticsResponse.


        :param start_date: The start_date of this IndicatorStatisticsResponse.  # noqa: E501
        :type: datetime
        """

        self._start_date = start_date

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


        :return: The end_date of this IndicatorStatisticsResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this IndicatorStatisticsResponse.


        :param end_date: The end_date of this IndicatorStatisticsResponse.  # noqa: E501
        :type: datetime
        """

        self._end_date = end_date

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

        return self.__dict__ == other.__dict__

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