# coding: utf-8

"""
InterfaceCounterGroup.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


class InterfaceCounterGroup(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        InterfaceCounterGroup - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'controller_ref': 'str',  # (required parameter)
            'base_time': 'int',  # (required parameter)
            'start_time': 'int',  # (required parameter)
            'observed_time': 'int',  # (required parameter)
            'channel_type': 'str',  # (required parameter)
            'channel_number': 'int',  # (required parameter)
            'read_ops': 'int',  # (required parameter)
            'read_bytes': 'int',  # (required parameter)
            'read_time_total': 'int',  # (required parameter)
            'read_time_max': 'int',  # (required parameter)
            'write_ops': 'int',  # (required parameter)
            'write_bytes': 'int',  # (required parameter)
            'write_time_total': 'int',  # (required parameter)
            'write_time_max': 'int',  # (required parameter)
            'other_ops': 'int',  # (required parameter)
            'other_time_total': 'int',  # (required parameter)
            'other_time_max': 'int',  # (required parameter)
            'read_time_total_sq': 'int',  # (required parameter)
            'write_time_total_sq': 'int',  # (required parameter)
            'other_time_total_sq': 'int',  # (required parameter)
            'queue_depth_total': 'int',  # (required parameter)
            'queue_depth_max': 'int',  # (required parameter)
            'channel_error_counts': 'int'
        }

        self.attribute_map = {
            'controller_ref': 'controllerRef',  # (required parameter)
            'base_time': 'baseTime',  # (required parameter)
            'start_time': 'startTime',  # (required parameter)
            'observed_time': 'observedTime',  # (required parameter)
            'channel_type': 'channelType',  # (required parameter)
            'channel_number': 'channelNumber',  # (required parameter)
            'read_ops': 'readOps',  # (required parameter)
            'read_bytes': 'readBytes',  # (required parameter)
            'read_time_total': 'readTimeTotal',  # (required parameter)
            'read_time_max': 'readTimeMax',  # (required parameter)
            'write_ops': 'writeOps',  # (required parameter)
            'write_bytes': 'writeBytes',  # (required parameter)
            'write_time_total': 'writeTimeTotal',  # (required parameter)
            'write_time_max': 'writeTimeMax',  # (required parameter)
            'other_ops': 'otherOps',  # (required parameter)
            'other_time_total': 'otherTimeTotal',  # (required parameter)
            'other_time_max': 'otherTimeMax',  # (required parameter)
            'read_time_total_sq': 'readTimeTotalSq',  # (required parameter)
            'write_time_total_sq': 'writeTimeTotalSq',  # (required parameter)
            'other_time_total_sq': 'otherTimeTotalSq',  # (required parameter)
            'queue_depth_total': 'queueDepthTotal',  # (required parameter)
            'queue_depth_max': 'queueDepthMax',  # (required parameter)
            'channel_error_counts': 'channelErrorCounts'
        }

        self._controller_ref = None
        self._base_time = None
        self._start_time = None
        self._observed_time = None
        self._channel_type = None
        self._channel_number = None
        self._read_ops = None
        self._read_bytes = None
        self._read_time_total = None
        self._read_time_max = None
        self._write_ops = None
        self._write_bytes = None
        self._write_time_total = None
        self._write_time_max = None
        self._other_ops = None
        self._other_time_total = None
        self._other_time_max = None
        self._read_time_total_sq = None
        self._write_time_total_sq = None
        self._other_time_total_sq = None
        self._queue_depth_total = None
        self._queue_depth_max = None
        self._channel_error_counts = None

    @property
    def controller_ref(self):
        """
        Gets the controller_ref of this InterfaceCounterGroup.
        The controller that generated this group.

        :return: The controller_ref of this InterfaceCounterGroup.
        :rtype: str
        :required/optional: required
        """
        return self._controller_ref

    @controller_ref.setter
    def controller_ref(self, controller_ref):
        """
        Sets the controller_ref of this InterfaceCounterGroup.
        The controller that generated this group.

        :param controller_ref: The controller_ref of this InterfaceCounterGroup.
        :type: str
        """
        self._controller_ref = controller_ref

    @property
    def base_time(self):
        """
        Gets the base_time of this InterfaceCounterGroup.
        Time the counters were last reset. Time is the number of seconds since midnight, January 1, 1970.

        :return: The base_time of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._base_time

    @base_time.setter
    def base_time(self, base_time):
        """
        Sets the base_time of this InterfaceCounterGroup.
        Time the counters were last reset. Time is the number of seconds since midnight, January 1, 1970.

        :param base_time: The base_time of this InterfaceCounterGroup.
        :type: int
        """
        self._base_time = base_time

    @property
    def start_time(self):
        """
        Gets the start_time of this InterfaceCounterGroup.
        Start time for this collection as measured by the number of seconds since baseTime.

        :return: The start_time of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """
        Sets the start_time of this InterfaceCounterGroup.
        Start time for this collection as measured by the number of seconds since baseTime.

        :param start_time: The start_time of this InterfaceCounterGroup.
        :type: int
        """
        self._start_time = start_time

    @property
    def observed_time(self):
        """
        Gets the observed_time of this InterfaceCounterGroup.
        End time for this collection as measured by the number of seconds since baseTime.

        :return: The observed_time of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._observed_time

    @observed_time.setter
    def observed_time(self, observed_time):
        """
        Sets the observed_time of this InterfaceCounterGroup.
        End time for this collection as measured by the number of seconds since baseTime.

        :param observed_time: The observed_time of this InterfaceCounterGroup.
        :type: int
        """
        self._observed_time = observed_time

    @property
    def channel_type(self):
        """
        Gets the channel_type of this InterfaceCounterGroup.
        Channel Type enumeration Drive side, host side, or management.

        :return: The channel_type of this InterfaceCounterGroup.
        :rtype: str
        :required/optional: required
        """
        return self._channel_type

    @channel_type.setter
    def channel_type(self, channel_type):
        """
        Sets the channel_type of this InterfaceCounterGroup.
        Channel Type enumeration Drive side, host side, or management.

        :param channel_type: The channel_type of this InterfaceCounterGroup.
        :type: str
        """
        allowed_values = ["hostside", "driveside", "management", "__UNDEFINED"]
        if channel_type not in allowed_values:
            raise ValueError(
                "Invalid value for `channel_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._channel_type = channel_type

    @property
    def channel_number(self):
        """
        Gets the channel_number of this InterfaceCounterGroup.
        Channel numerical ID.

        :return: The channel_number of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._channel_number

    @channel_number.setter
    def channel_number(self, channel_number):
        """
        Sets the channel_number of this InterfaceCounterGroup.
        Channel numerical ID.

        :param channel_number: The channel_number of this InterfaceCounterGroup.
        :type: int
        """
        self._channel_number = channel_number

    @property
    def read_ops(self):
        """
        Gets the read_ops of this InterfaceCounterGroup.
        Number of read operations.

        :return: The read_ops of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._read_ops

    @read_ops.setter
    def read_ops(self, read_ops):
        """
        Sets the read_ops of this InterfaceCounterGroup.
        Number of read operations.

        :param read_ops: The read_ops of this InterfaceCounterGroup.
        :type: int
        """
        self._read_ops = read_ops

    @property
    def read_bytes(self):
        """
        Gets the read_bytes of this InterfaceCounterGroup.
        Number of bytes read.

        :return: The read_bytes of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._read_bytes

    @read_bytes.setter
    def read_bytes(self, read_bytes):
        """
        Sets the read_bytes of this InterfaceCounterGroup.
        Number of bytes read.

        :param read_bytes: The read_bytes of this InterfaceCounterGroup.
        :type: int
        """
        self._read_bytes = read_bytes

    @property
    def read_time_total(self):
        """
        Gets the read_time_total of this InterfaceCounterGroup.
        Total time in microseconds spent in read operations.

        :return: The read_time_total of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._read_time_total

    @read_time_total.setter
    def read_time_total(self, read_time_total):
        """
        Sets the read_time_total of this InterfaceCounterGroup.
        Total time in microseconds spent in read operations.

        :param read_time_total: The read_time_total of this InterfaceCounterGroup.
        :type: int
        """
        self._read_time_total = read_time_total

    @property
    def read_time_max(self):
        """
        Gets the read_time_max of this InterfaceCounterGroup.
        Max time in microseconds spent processing one read operation.

        :return: The read_time_max of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._read_time_max

    @read_time_max.setter
    def read_time_max(self, read_time_max):
        """
        Sets the read_time_max of this InterfaceCounterGroup.
        Max time in microseconds spent processing one read operation.

        :param read_time_max: The read_time_max of this InterfaceCounterGroup.
        :type: int
        """
        self._read_time_max = read_time_max

    @property
    def write_ops(self):
        """
        Gets the write_ops of this InterfaceCounterGroup.
        Number of write operations.

        :return: The write_ops of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._write_ops

    @write_ops.setter
    def write_ops(self, write_ops):
        """
        Sets the write_ops of this InterfaceCounterGroup.
        Number of write operations.

        :param write_ops: The write_ops of this InterfaceCounterGroup.
        :type: int
        """
        self._write_ops = write_ops

    @property
    def write_bytes(self):
        """
        Gets the write_bytes of this InterfaceCounterGroup.
        Number of bytes write.

        :return: The write_bytes of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._write_bytes

    @write_bytes.setter
    def write_bytes(self, write_bytes):
        """
        Sets the write_bytes of this InterfaceCounterGroup.
        Number of bytes write.

        :param write_bytes: The write_bytes of this InterfaceCounterGroup.
        :type: int
        """
        self._write_bytes = write_bytes

    @property
    def write_time_total(self):
        """
        Gets the write_time_total of this InterfaceCounterGroup.
        Total time in microseconds spent in write operations.

        :return: The write_time_total of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._write_time_total

    @write_time_total.setter
    def write_time_total(self, write_time_total):
        """
        Sets the write_time_total of this InterfaceCounterGroup.
        Total time in microseconds spent in write operations.

        :param write_time_total: The write_time_total of this InterfaceCounterGroup.
        :type: int
        """
        self._write_time_total = write_time_total

    @property
    def write_time_max(self):
        """
        Gets the write_time_max of this InterfaceCounterGroup.
        Max time in microseconds spent processing one write operation.

        :return: The write_time_max of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._write_time_max

    @write_time_max.setter
    def write_time_max(self, write_time_max):
        """
        Sets the write_time_max of this InterfaceCounterGroup.
        Max time in microseconds spent processing one write operation.

        :param write_time_max: The write_time_max of this InterfaceCounterGroup.
        :type: int
        """
        self._write_time_max = write_time_max

    @property
    def other_ops(self):
        """
        Gets the other_ops of this InterfaceCounterGroup.
        Number of non-read-write operations.

        :return: The other_ops of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._other_ops

    @other_ops.setter
    def other_ops(self, other_ops):
        """
        Sets the other_ops of this InterfaceCounterGroup.
        Number of non-read-write operations.

        :param other_ops: The other_ops of this InterfaceCounterGroup.
        :type: int
        """
        self._other_ops = other_ops

    @property
    def other_time_total(self):
        """
        Gets the other_time_total of this InterfaceCounterGroup.
        Total time in microseconds spent in non-read-write ops.

        :return: The other_time_total of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._other_time_total

    @other_time_total.setter
    def other_time_total(self, other_time_total):
        """
        Sets the other_time_total of this InterfaceCounterGroup.
        Total time in microseconds spent in non-read-write ops.

        :param other_time_total: The other_time_total of this InterfaceCounterGroup.
        :type: int
        """
        self._other_time_total = other_time_total

    @property
    def other_time_max(self):
        """
        Gets the other_time_max of this InterfaceCounterGroup.
        Max time in microseconds spent processing one non-read-write op.

        :return: The other_time_max of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._other_time_max

    @other_time_max.setter
    def other_time_max(self, other_time_max):
        """
        Sets the other_time_max of this InterfaceCounterGroup.
        Max time in microseconds spent processing one non-read-write op.

        :param other_time_max: The other_time_max of this InterfaceCounterGroup.
        :type: int
        """
        self._other_time_max = other_time_max

    @property
    def read_time_total_sq(self):
        """
        Gets the read_time_total_sq of this InterfaceCounterGroup.
        Sum of the squares of microseconds spent in read operations.

        :return: The read_time_total_sq of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._read_time_total_sq

    @read_time_total_sq.setter
    def read_time_total_sq(self, read_time_total_sq):
        """
        Sets the read_time_total_sq of this InterfaceCounterGroup.
        Sum of the squares of microseconds spent in read operations.

        :param read_time_total_sq: The read_time_total_sq of this InterfaceCounterGroup.
        :type: int
        """
        self._read_time_total_sq = read_time_total_sq

    @property
    def write_time_total_sq(self):
        """
        Gets the write_time_total_sq of this InterfaceCounterGroup.
        Sum of the squares of microseconds spent in write operations.

        :return: The write_time_total_sq of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._write_time_total_sq

    @write_time_total_sq.setter
    def write_time_total_sq(self, write_time_total_sq):
        """
        Sets the write_time_total_sq of this InterfaceCounterGroup.
        Sum of the squares of microseconds spent in write operations.

        :param write_time_total_sq: The write_time_total_sq of this InterfaceCounterGroup.
        :type: int
        """
        self._write_time_total_sq = write_time_total_sq

    @property
    def other_time_total_sq(self):
        """
        Gets the other_time_total_sq of this InterfaceCounterGroup.
        Sum of the squares of microseconds spent in non-read-write operations.

        :return: The other_time_total_sq of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._other_time_total_sq

    @other_time_total_sq.setter
    def other_time_total_sq(self, other_time_total_sq):
        """
        Sets the other_time_total_sq of this InterfaceCounterGroup.
        Sum of the squares of microseconds spent in non-read-write operations.

        :param other_time_total_sq: The other_time_total_sq of this InterfaceCounterGroup.
        :type: int
        """
        self._other_time_total_sq = other_time_total_sq

    @property
    def queue_depth_total(self):
        """
        Gets the queue_depth_total of this InterfaceCounterGroup.
        Total channel queue depth.

        :return: The queue_depth_total of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._queue_depth_total

    @queue_depth_total.setter
    def queue_depth_total(self, queue_depth_total):
        """
        Sets the queue_depth_total of this InterfaceCounterGroup.
        Total channel queue depth.

        :param queue_depth_total: The queue_depth_total of this InterfaceCounterGroup.
        :type: int
        """
        self._queue_depth_total = queue_depth_total

    @property
    def queue_depth_max(self):
        """
        Gets the queue_depth_max of this InterfaceCounterGroup.
        Maximum channel queue depth.

        :return: The queue_depth_max of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._queue_depth_max

    @queue_depth_max.setter
    def queue_depth_max(self, queue_depth_max):
        """
        Sets the queue_depth_max of this InterfaceCounterGroup.
        Maximum channel queue depth.

        :param queue_depth_max: The queue_depth_max of this InterfaceCounterGroup.
        :type: int
        """
        self._queue_depth_max = queue_depth_max

    @property
    def channel_error_counts(self):
        """
        Gets the channel_error_counts of this InterfaceCounterGroup.
        The total number of errors detected on this channel.

        :return: The channel_error_counts of this InterfaceCounterGroup.
        :rtype: int
        :required/optional: required
        """
        return self._channel_error_counts

    @channel_error_counts.setter
    def channel_error_counts(self, channel_error_counts):
        """
        Sets the channel_error_counts of this InterfaceCounterGroup.
        The total number of errors detected on this channel.

        :param channel_error_counts: The channel_error_counts of this InterfaceCounterGroup.
        :type: int
        """
        self._channel_error_counts = channel_error_counts

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

        for attr, _ in 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 pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        if self is None:
           return None
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        if self is None or other is None:
            return None
        return self.__dict__ == other.__dict__

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

