# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

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


import pprint
import re  # noqa: F401
import six


class ClusterStat(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 = {
        'create': 'datetime',
        'degraded_percent': 'float',
        'error_kbyte': 'int',
        'healthy_percent': 'float',
        'os_down_bandwidth_kbyte': 'float',
        'os_down_iops': 'float',
        'os_merge_speed': 'int',
        'os_up_bandwidth_kbyte': 'float',
        'os_up_iops': 'float',
        'read_bandwidth_kbyte': 'float',
        'read_iops': 'float',
        'read_latency_us': 'float',
        'recovery_bandwidth_kbyte': 'float',
        'recovery_iops': 'float',
        'recovery_percent': 'float',
        'total_kbyte': 'int',
        'unavailable_percent': 'float',
        'used_kbyte': 'int',
        'write_bandwidth_kbyte': 'float',
        'write_iops': 'float',
        'write_latency_us': 'float'
    }

    attribute_map = {
        'create': 'create',
        'degraded_percent': 'degraded_percent',
        'error_kbyte': 'error_kbyte',
        'healthy_percent': 'healthy_percent',
        'os_down_bandwidth_kbyte': 'os_down_bandwidth_kbyte',
        'os_down_iops': 'os_down_iops',
        'os_merge_speed': 'os_merge_speed',
        'os_up_bandwidth_kbyte': 'os_up_bandwidth_kbyte',
        'os_up_iops': 'os_up_iops',
        'read_bandwidth_kbyte': 'read_bandwidth_kbyte',
        'read_iops': 'read_iops',
        'read_latency_us': 'read_latency_us',
        'recovery_bandwidth_kbyte': 'recovery_bandwidth_kbyte',
        'recovery_iops': 'recovery_iops',
        'recovery_percent': 'recovery_percent',
        'total_kbyte': 'total_kbyte',
        'unavailable_percent': 'unavailable_percent',
        'used_kbyte': 'used_kbyte',
        'write_bandwidth_kbyte': 'write_bandwidth_kbyte',
        'write_iops': 'write_iops',
        'write_latency_us': 'write_latency_us'
    }

    def __init__(self, create=None, degraded_percent=None, error_kbyte=None, healthy_percent=None, os_down_bandwidth_kbyte=None, os_down_iops=None, os_merge_speed=None, os_up_bandwidth_kbyte=None, os_up_iops=None, read_bandwidth_kbyte=None, read_iops=None, read_latency_us=None, recovery_bandwidth_kbyte=None, recovery_iops=None, recovery_percent=None, total_kbyte=None, unavailable_percent=None, used_kbyte=None, write_bandwidth_kbyte=None, write_iops=None, write_latency_us=None):  # noqa: E501
        """ClusterStat - a model defined in Swagger"""  # noqa: E501

        self._create = None
        self._degraded_percent = None
        self._error_kbyte = None
        self._healthy_percent = None
        self._os_down_bandwidth_kbyte = None
        self._os_down_iops = None
        self._os_merge_speed = None
        self._os_up_bandwidth_kbyte = None
        self._os_up_iops = None
        self._read_bandwidth_kbyte = None
        self._read_iops = None
        self._read_latency_us = None
        self._recovery_bandwidth_kbyte = None
        self._recovery_iops = None
        self._recovery_percent = None
        self._total_kbyte = None
        self._unavailable_percent = None
        self._used_kbyte = None
        self._write_bandwidth_kbyte = None
        self._write_iops = None
        self._write_latency_us = None
        self.discriminator = None

        if create is not None:
            self.create = create
        if degraded_percent is not None:
            self.degraded_percent = degraded_percent
        if error_kbyte is not None:
            self.error_kbyte = error_kbyte
        if healthy_percent is not None:
            self.healthy_percent = healthy_percent
        if os_down_bandwidth_kbyte is not None:
            self.os_down_bandwidth_kbyte = os_down_bandwidth_kbyte
        if os_down_iops is not None:
            self.os_down_iops = os_down_iops
        if os_merge_speed is not None:
            self.os_merge_speed = os_merge_speed
        if os_up_bandwidth_kbyte is not None:
            self.os_up_bandwidth_kbyte = os_up_bandwidth_kbyte
        if os_up_iops is not None:
            self.os_up_iops = os_up_iops
        if read_bandwidth_kbyte is not None:
            self.read_bandwidth_kbyte = read_bandwidth_kbyte
        if read_iops is not None:
            self.read_iops = read_iops
        if read_latency_us is not None:
            self.read_latency_us = read_latency_us
        if recovery_bandwidth_kbyte is not None:
            self.recovery_bandwidth_kbyte = recovery_bandwidth_kbyte
        if recovery_iops is not None:
            self.recovery_iops = recovery_iops
        if recovery_percent is not None:
            self.recovery_percent = recovery_percent
        if total_kbyte is not None:
            self.total_kbyte = total_kbyte
        if unavailable_percent is not None:
            self.unavailable_percent = unavailable_percent
        if used_kbyte is not None:
            self.used_kbyte = used_kbyte
        if write_bandwidth_kbyte is not None:
            self.write_bandwidth_kbyte = write_bandwidth_kbyte
        if write_iops is not None:
            self.write_iops = write_iops
        if write_latency_us is not None:
            self.write_latency_us = write_latency_us

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


        :return: The create of this ClusterStat.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this ClusterStat.


        :param create: The create of this ClusterStat.  # noqa: E501
        :type: datetime
        """

        self._create = create

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


        :return: The degraded_percent of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._degraded_percent

    @degraded_percent.setter
    def degraded_percent(self, degraded_percent):
        """Sets the degraded_percent of this ClusterStat.


        :param degraded_percent: The degraded_percent of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._degraded_percent = degraded_percent

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


        :return: The error_kbyte of this ClusterStat.  # noqa: E501
        :rtype: int
        """
        return self._error_kbyte

    @error_kbyte.setter
    def error_kbyte(self, error_kbyte):
        """Sets the error_kbyte of this ClusterStat.


        :param error_kbyte: The error_kbyte of this ClusterStat.  # noqa: E501
        :type: int
        """

        self._error_kbyte = error_kbyte

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


        :return: The healthy_percent of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._healthy_percent

    @healthy_percent.setter
    def healthy_percent(self, healthy_percent):
        """Sets the healthy_percent of this ClusterStat.


        :param healthy_percent: The healthy_percent of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._healthy_percent = healthy_percent

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


        :return: The os_down_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._os_down_bandwidth_kbyte

    @os_down_bandwidth_kbyte.setter
    def os_down_bandwidth_kbyte(self, os_down_bandwidth_kbyte):
        """Sets the os_down_bandwidth_kbyte of this ClusterStat.


        :param os_down_bandwidth_kbyte: The os_down_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._os_down_bandwidth_kbyte = os_down_bandwidth_kbyte

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


        :return: The os_down_iops of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._os_down_iops

    @os_down_iops.setter
    def os_down_iops(self, os_down_iops):
        """Sets the os_down_iops of this ClusterStat.


        :param os_down_iops: The os_down_iops of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._os_down_iops = os_down_iops

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


        :return: The os_merge_speed of this ClusterStat.  # noqa: E501
        :rtype: int
        """
        return self._os_merge_speed

    @os_merge_speed.setter
    def os_merge_speed(self, os_merge_speed):
        """Sets the os_merge_speed of this ClusterStat.


        :param os_merge_speed: The os_merge_speed of this ClusterStat.  # noqa: E501
        :type: int
        """

        self._os_merge_speed = os_merge_speed

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


        :return: The os_up_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._os_up_bandwidth_kbyte

    @os_up_bandwidth_kbyte.setter
    def os_up_bandwidth_kbyte(self, os_up_bandwidth_kbyte):
        """Sets the os_up_bandwidth_kbyte of this ClusterStat.


        :param os_up_bandwidth_kbyte: The os_up_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._os_up_bandwidth_kbyte = os_up_bandwidth_kbyte

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


        :return: The os_up_iops of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._os_up_iops

    @os_up_iops.setter
    def os_up_iops(self, os_up_iops):
        """Sets the os_up_iops of this ClusterStat.


        :param os_up_iops: The os_up_iops of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._os_up_iops = os_up_iops

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


        :return: The read_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._read_bandwidth_kbyte

    @read_bandwidth_kbyte.setter
    def read_bandwidth_kbyte(self, read_bandwidth_kbyte):
        """Sets the read_bandwidth_kbyte of this ClusterStat.


        :param read_bandwidth_kbyte: The read_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._read_bandwidth_kbyte = read_bandwidth_kbyte

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


        :return: The read_iops of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._read_iops

    @read_iops.setter
    def read_iops(self, read_iops):
        """Sets the read_iops of this ClusterStat.


        :param read_iops: The read_iops of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._read_iops = read_iops

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


        :return: The read_latency_us of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._read_latency_us

    @read_latency_us.setter
    def read_latency_us(self, read_latency_us):
        """Sets the read_latency_us of this ClusterStat.


        :param read_latency_us: The read_latency_us of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._read_latency_us = read_latency_us

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


        :return: The recovery_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._recovery_bandwidth_kbyte

    @recovery_bandwidth_kbyte.setter
    def recovery_bandwidth_kbyte(self, recovery_bandwidth_kbyte):
        """Sets the recovery_bandwidth_kbyte of this ClusterStat.


        :param recovery_bandwidth_kbyte: The recovery_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._recovery_bandwidth_kbyte = recovery_bandwidth_kbyte

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


        :return: The recovery_iops of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._recovery_iops

    @recovery_iops.setter
    def recovery_iops(self, recovery_iops):
        """Sets the recovery_iops of this ClusterStat.


        :param recovery_iops: The recovery_iops of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._recovery_iops = recovery_iops

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


        :return: The recovery_percent of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._recovery_percent

    @recovery_percent.setter
    def recovery_percent(self, recovery_percent):
        """Sets the recovery_percent of this ClusterStat.


        :param recovery_percent: The recovery_percent of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._recovery_percent = recovery_percent

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


        :return: The total_kbyte of this ClusterStat.  # noqa: E501
        :rtype: int
        """
        return self._total_kbyte

    @total_kbyte.setter
    def total_kbyte(self, total_kbyte):
        """Sets the total_kbyte of this ClusterStat.


        :param total_kbyte: The total_kbyte of this ClusterStat.  # noqa: E501
        :type: int
        """

        self._total_kbyte = total_kbyte

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


        :return: The unavailable_percent of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._unavailable_percent

    @unavailable_percent.setter
    def unavailable_percent(self, unavailable_percent):
        """Sets the unavailable_percent of this ClusterStat.


        :param unavailable_percent: The unavailable_percent of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._unavailable_percent = unavailable_percent

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


        :return: The used_kbyte of this ClusterStat.  # noqa: E501
        :rtype: int
        """
        return self._used_kbyte

    @used_kbyte.setter
    def used_kbyte(self, used_kbyte):
        """Sets the used_kbyte of this ClusterStat.


        :param used_kbyte: The used_kbyte of this ClusterStat.  # noqa: E501
        :type: int
        """

        self._used_kbyte = used_kbyte

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


        :return: The write_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._write_bandwidth_kbyte

    @write_bandwidth_kbyte.setter
    def write_bandwidth_kbyte(self, write_bandwidth_kbyte):
        """Sets the write_bandwidth_kbyte of this ClusterStat.


        :param write_bandwidth_kbyte: The write_bandwidth_kbyte of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._write_bandwidth_kbyte = write_bandwidth_kbyte

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


        :return: The write_iops of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._write_iops

    @write_iops.setter
    def write_iops(self, write_iops):
        """Sets the write_iops of this ClusterStat.


        :param write_iops: The write_iops of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._write_iops = write_iops

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


        :return: The write_latency_us of this ClusterStat.  # noqa: E501
        :rtype: float
        """
        return self._write_latency_us

    @write_latency_us.setter
    def write_latency_us(self, write_latency_us):
        """Sets the write_latency_us of this ClusterStat.


        :param write_latency_us: The write_latency_us of this ClusterStat.  # noqa: E501
        :type: float
        """

        self._write_latency_us = write_latency_us

    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

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

        return self.__dict__ == other.__dict__

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