# coding: utf-8

"""
CounterGroup.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 CounterGroup(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        CounterGroup - 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 = {
            'group_type': 'str',  # (required parameter)
            'drv_counter_group': 'DriveCounterGroup',  
            'impl_counter_group': 'ImplementationCounterGroup',  
            'io_counter_group': 'IoCounterGroup',  
            'vol_counter_group': 'VolumeCounterGroup',  
            'controller_counter_group': 'ControllerCounterGroup',  
            'interface_counter_group': 'InterfaceCounterGroup'
        }

        self.attribute_map = {
            'group_type': 'groupType',  # (required parameter)
            'drv_counter_group': 'drvCounterGroup',  
            'impl_counter_group': 'implCounterGroup',  
            'io_counter_group': 'ioCounterGroup',  
            'vol_counter_group': 'volCounterGroup',  
            'controller_counter_group': 'controllerCounterGroup',  
            'interface_counter_group': 'interfaceCounterGroup'
        }

        self._group_type = None
        self._drv_counter_group = None
        self._impl_counter_group = None
        self._io_counter_group = None
        self._vol_counter_group = None
        self._controller_counter_group = None
        self._interface_counter_group = None

    @property
    def group_type(self):
        """
        Gets the group_type of this CounterGroup.
        This enumeration type identifies the different types of counter group statistics that are provided by the controller firmware.

        :return: The group_type of this CounterGroup.
        :rtype: str
        :required/optional: required
        """
        return self._group_type

    @group_type.setter
    def group_type(self, group_type):
        """
        Sets the group_type of this CounterGroup.
        This enumeration type identifies the different types of counter group statistics that are provided by the controller firmware.

        :param group_type: The group_type of this CounterGroup.
        :type: str
        """
        allowed_values = ["drive", "implementation", "io", "volume", "controller", "iointerface", "__UNDEFINED"]
        if group_type not in allowed_values:
            raise ValueError(
                "Invalid value for `group_type`, must be one of {0}"
                .format(allowed_values)
            )
        self._group_type = group_type

    @property
    def drv_counter_group(self):
        """
        Gets the drv_counter_group of this CounterGroup.
        Drive-related statistical counters. This field is only present if groupType is equal to COUNTER_GROUP_DRIVE.

        :return: The drv_counter_group of this CounterGroup.
        :rtype: DriveCounterGroup
        :required/optional: optional
        """
        return self._drv_counter_group

    @drv_counter_group.setter
    def drv_counter_group(self, drv_counter_group):
        """
        Sets the drv_counter_group of this CounterGroup.
        Drive-related statistical counters. This field is only present if groupType is equal to COUNTER_GROUP_DRIVE.

        :param drv_counter_group: The drv_counter_group of this CounterGroup.
        :type: DriveCounterGroup
        """
        self._drv_counter_group = drv_counter_group

    @property
    def impl_counter_group(self):
        """
        Gets the impl_counter_group of this CounterGroup.
        RAID-implementation-related statistical counters. This field is only present if groupType is equal to COUNTER_GROUP_IMPLEMENTATION.

        :return: The impl_counter_group of this CounterGroup.
        :rtype: ImplementationCounterGroup
        :required/optional: optional
        """
        return self._impl_counter_group

    @impl_counter_group.setter
    def impl_counter_group(self, impl_counter_group):
        """
        Sets the impl_counter_group of this CounterGroup.
        RAID-implementation-related statistical counters. This field is only present if groupType is equal to COUNTER_GROUP_IMPLEMENTATION.

        :param impl_counter_group: The impl_counter_group of this CounterGroup.
        :type: ImplementationCounterGroup
        """
        self._impl_counter_group = impl_counter_group

    @property
    def io_counter_group(self):
        """
        Gets the io_counter_group of this CounterGroup.
        I/O-operation-related statistical counters. This field is only present if the groupType is equal to COUNTER_GROUP_IO

        :return: The io_counter_group of this CounterGroup.
        :rtype: IoCounterGroup
        :required/optional: optional
        """
        return self._io_counter_group

    @io_counter_group.setter
    def io_counter_group(self, io_counter_group):
        """
        Sets the io_counter_group of this CounterGroup.
        I/O-operation-related statistical counters. This field is only present if the groupType is equal to COUNTER_GROUP_IO

        :param io_counter_group: The io_counter_group of this CounterGroup.
        :type: IoCounterGroup
        """
        self._io_counter_group = io_counter_group

    @property
    def vol_counter_group(self):
        """
        Gets the vol_counter_group of this CounterGroup.
        Volume-related statistical counters. This field is only present if groupType is equal to COUNTER_GROUP_VOLUME.

        :return: The vol_counter_group of this CounterGroup.
        :rtype: VolumeCounterGroup
        :required/optional: optional
        """
        return self._vol_counter_group

    @vol_counter_group.setter
    def vol_counter_group(self, vol_counter_group):
        """
        Sets the vol_counter_group of this CounterGroup.
        Volume-related statistical counters. This field is only present if groupType is equal to COUNTER_GROUP_VOLUME.

        :param vol_counter_group: The vol_counter_group of this CounterGroup.
        :type: VolumeCounterGroup
        """
        self._vol_counter_group = vol_counter_group

    @property
    def controller_counter_group(self):
        """
        Gets the controller_counter_group of this CounterGroup.
        The ControllerCounterGroup tracks statistics at the controller level and are not specific to a volume, interface or drive. These fields include the CPU utilization, total numbers of reads, writes, and non-read/write commands, and cache mirroring statistics. The ObjectReference must be a ControllerRef.

        :return: The controller_counter_group of this CounterGroup.
        :rtype: ControllerCounterGroup
        :required/optional: optional
        """
        return self._controller_counter_group

    @controller_counter_group.setter
    def controller_counter_group(self, controller_counter_group):
        """
        Sets the controller_counter_group of this CounterGroup.
        The ControllerCounterGroup tracks statistics at the controller level and are not specific to a volume, interface or drive. These fields include the CPU utilization, total numbers of reads, writes, and non-read/write commands, and cache mirroring statistics. The ObjectReference must be a ControllerRef.

        :param controller_counter_group: The controller_counter_group of this CounterGroup.
        :type: ControllerCounterGroup
        """
        self._controller_counter_group = controller_counter_group

    @property
    def interface_counter_group(self):
        """
        Gets the interface_counter_group of this CounterGroup.
        The InterfaceCounterGroup tracks statistics on a per channel level. This group reports the type of channel, its channel number, and the read, write and other operation counters. It also reports queue depth statistics.

        :return: The interface_counter_group of this CounterGroup.
        :rtype: InterfaceCounterGroup
        :required/optional: optional
        """
        return self._interface_counter_group

    @interface_counter_group.setter
    def interface_counter_group(self, interface_counter_group):
        """
        Sets the interface_counter_group of this CounterGroup.
        The InterfaceCounterGroup tracks statistics on a per channel level. This group reports the type of channel, its channel number, and the read, write and other operation counters. It also reports queue depth statistics.

        :param interface_counter_group: The interface_counter_group of this CounterGroup.
        :type: InterfaceCounterGroup
        """
        self._interface_counter_group = interface_counter_group

    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

