# coding: utf-8

"""
    Amber API Server

    Boon Logic Amber API server

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

import pprint
import re  # noqa: F401

import six

class ModelStatus(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 = {
        'state': 'AmberState',
        'warning_level': 'int',
        'sample_count': 'int',
        'cluster_count': 'int',
        'progress': 'int',
        'message': 'str',
        'last_modified': 'int',
        'last_modified_delta': 'int'
    }

    attribute_map = {
        'state': 'state',
        'warning_level': 'warningLevel',
        'sample_count': 'sampleCount',
        'cluster_count': 'clusterCount',
        'progress': 'progress',
        'message': 'message',
        'last_modified': 'lastModified',
        'last_modified_delta': 'lastModifiedDelta'
    }

    def __init__(self, state=None, warning_level=None, sample_count=None, cluster_count=None, progress=None, message=None, last_modified=None, last_modified_delta=None):
        """ModelStatus - a model defined in Swagger"""
        self._state = None
        self._warning_level = None
        self._sample_count = None
        self._cluster_count = None
        self._progress = None
        self._message = None
        self._last_modified = None
        self._last_modified_delta = None
        self.discriminator = None
        if state is not None:
            self.state = state
        if warning_level is not None:
            self.warning_level = warning_level
        if sample_count is not None:
            self.sample_count = sample_count
        if cluster_count is not None:
            self.cluster_count = cluster_count
        if progress is not None:
            self.progress = progress
        if message is not None:
            self.message = message
        if last_modified is not None:
            self.last_modified = last_modified
        if last_modified_delta is not None:
            self.last_modified_delta = last_modified_delta

    @property
    def state(self):
        """Gets the state of this ModelStatus.


        :return: The state of this ModelStatus.
        :rtype: AmberState
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this ModelStatus.


        :param state: The state of this ModelStatus.
        :type: AmberState
        """

        self._state = state

    @property
    def warning_level(self):
        """Gets the warning_level of this ModelStatus.

        Current Amber warning level, a measure of the compliance of recent behavior compared to behavior observed `Learning`.  - `0`: OK - `1`: asset changing - `2`: asset critical

        :return: The warning_level of this ModelStatus.
        :rtype: int
        """
        return self._warning_level

    @warning_level.setter
    def warning_level(self, warning_level):
        """Sets the warning_level of this ModelStatus.

        Current Amber warning level, a measure of the compliance of recent behavior compared to behavior observed `Learning`.  - `0`: OK - `1`: asset changing - `2`: asset critical

        :param warning_level: The warning_level of this ModelStatus.
        :type: int
        """

        self._warning_level = warning_level

    @property
    def sample_count(self):
        """Gets the sample_count of this ModelStatus.

        Total number of patterns processed since configuration.

        :return: The sample_count of this ModelStatus.
        :rtype: int
        """
        return self._sample_count

    @sample_count.setter
    def sample_count(self, sample_count):
        """Sets the sample_count of this ModelStatus.

        Total number of patterns processed since configuration.

        :param sample_count: The sample_count of this ModelStatus.
        :type: int
        """

        self._sample_count = sample_count

    @property
    def cluster_count(self):
        """Gets the cluster_count of this ModelStatus.

        Total number of clusters generated by patterns so far.

        :return: The cluster_count of this ModelStatus.
        :rtype: int
        """
        return self._cluster_count

    @cluster_count.setter
    def cluster_count(self, cluster_count):
        """Sets the cluster_count of this ModelStatus.

        Total number of clusters generated by patterns so far.

        :param cluster_count: The cluster_count of this ModelStatus.
        :type: int
        """

        self._cluster_count = cluster_count

    @property
    def progress(self):
        """Gets the progress of this ModelStatus.

        During `Buffering`, `Learning` and `Autotuning`: estimated progress through the current state as an integer percentage.  During `Monitoring`: this field does not apply.

        :return: The progress of this ModelStatus.
        :rtype: int
        """
        return self._progress

    @progress.setter
    def progress(self, progress):
        """Sets the progress of this ModelStatus.

        During `Buffering`, `Learning` and `Autotuning`: estimated progress through the current state as an integer percentage.  During `Monitoring`: this field does not apply.

        :param progress: The progress of this ModelStatus.
        :type: int
        """

        self._progress = progress

    @property
    def message(self):
        """Gets the message of this ModelStatus.

        Status description.

        :return: The message of this ModelStatus.
        :rtype: str
        """
        return self._message

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

        Status description.

        :param message: The message of this ModelStatus.
        :type: str
        """

        self._message = message

    @property
    def last_modified(self):
        """Gets the last_modified of this ModelStatus.

        Unix time stamp of the last posted stream data

        :return: The last_modified of this ModelStatus.
        :rtype: int
        """
        return self._last_modified

    @last_modified.setter
    def last_modified(self, last_modified):
        """Sets the last_modified of this ModelStatus.

        Unix time stamp of the last posted stream data

        :param last_modified: The last_modified of this ModelStatus.
        :type: int
        """

        self._last_modified = last_modified

    @property
    def last_modified_delta(self):
        """Gets the last_modified_delta of this ModelStatus.

        number of seconds since the last posted stream data

        :return: The last_modified_delta of this ModelStatus.
        :rtype: int
        """
        return self._last_modified_delta

    @last_modified_delta.setter
    def last_modified_delta(self, last_modified_delta):
        """Sets the last_modified_delta of this ModelStatus.

        number of seconds since the last posted stream data

        :param last_modified_delta: The last_modified_delta of this ModelStatus.
        :type: int
        """

        self._last_modified_delta = last_modified_delta

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

        return self.__dict__ == other.__dict__

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