Source code for netapp.santricity.models.symbol.volume_group_summary

# coding: utf-8

"""
VolumeGroupSummary.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


[docs]class VolumeGroupSummary(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ VolumeGroupSummary - 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 = { 'volume_group_capacity': 'int', # (required parameter) 'volume_count': 'int', # (required parameter) 'volume_capacity': 'int', # (required parameter) 'tray_loss_protection': 'bool', # (required parameter) 'spindle_speed_match': 'bool', # (required parameter) 'spindle_speed': 'int', # (required parameter) 'volume_group_security_type': 'str', # (required parameter) 'drawer_loss_protection': 'bool', # (required parameter) 'drive_media_type': 'str', # (required parameter) 'protection_information_capable': 'bool', # (required parameter) 'drive_block_format': 'str', # (required parameter) 'volume_group_security_level': 'str' } self.attribute_map = { 'volume_group_capacity': 'volumeGroupCapacity', # (required parameter) 'volume_count': 'volumeCount', # (required parameter) 'volume_capacity': 'volumeCapacity', # (required parameter) 'tray_loss_protection': 'trayLossProtection', # (required parameter) 'spindle_speed_match': 'spindleSpeedMatch', # (required parameter) 'spindle_speed': 'spindleSpeed', # (required parameter) 'volume_group_security_type': 'volumeGroupSecurityType', # (required parameter) 'drawer_loss_protection': 'drawerLossProtection', # (required parameter) 'drive_media_type': 'driveMediaType', # (required parameter) 'protection_information_capable': 'protectionInformationCapable', # (required parameter) 'drive_block_format': 'driveBlockFormat', # (required parameter) 'volume_group_security_level': 'volumeGroupSecurityLevel' } self._volume_group_capacity = None self._volume_count = None self._volume_capacity = None self._tray_loss_protection = None self._spindle_speed_match = None self._spindle_speed = None self._volume_group_security_type = None self._drawer_loss_protection = None self._drive_media_type = None self._protection_information_capable = None self._drive_block_format = None self._volume_group_security_level = None @property def volume_group_capacity(self): """ Gets the volume_group_capacity of this VolumeGroupSummary. The total usable capacity of the volume group. :return: The volume_group_capacity of this VolumeGroupSummary. :rtype: int :required/optional: required """ return self._volume_group_capacity @volume_group_capacity.setter def volume_group_capacity(self, volume_group_capacity): """ Sets the volume_group_capacity of this VolumeGroupSummary. The total usable capacity of the volume group. :param volume_group_capacity: The volume_group_capacity of this VolumeGroupSummary. :type: int """ self._volume_group_capacity = volume_group_capacity @property def volume_count(self): """ Gets the volume_count of this VolumeGroupSummary. The number of volumes in the volume group. :return: The volume_count of this VolumeGroupSummary. :rtype: int :required/optional: required """ return self._volume_count @volume_count.setter def volume_count(self, volume_count): """ Sets the volume_count of this VolumeGroupSummary. The number of volumes in the volume group. :param volume_count: The volume_count of this VolumeGroupSummary. :type: int """ self._volume_count = volume_count @property def volume_capacity(self): """ Gets the volume_capacity of this VolumeGroupSummary. The total usable capacity of volume(s). :return: The volume_capacity of this VolumeGroupSummary. :rtype: int :required/optional: required """ return self._volume_capacity @volume_capacity.setter def volume_capacity(self, volume_capacity): """ Sets the volume_capacity of this VolumeGroupSummary. The total usable capacity of volume(s). :param volume_capacity: The volume_capacity of this VolumeGroupSummary. :type: int """ self._volume_capacity = volume_capacity @property def tray_loss_protection(self): """ Gets the tray_loss_protection of this VolumeGroupSummary. True, if volume group has tray loss protection. :return: The tray_loss_protection of this VolumeGroupSummary. :rtype: bool :required/optional: required """ return self._tray_loss_protection @tray_loss_protection.setter def tray_loss_protection(self, tray_loss_protection): """ Sets the tray_loss_protection of this VolumeGroupSummary. True, if volume group has tray loss protection. :param tray_loss_protection: The tray_loss_protection of this VolumeGroupSummary. :type: bool """ self._tray_loss_protection = tray_loss_protection @property def spindle_speed_match(self): """ Gets the spindle_speed_match of this VolumeGroupSummary. True, if all drives have matching spindle speed. :return: The spindle_speed_match of this VolumeGroupSummary. :rtype: bool :required/optional: required """ return self._spindle_speed_match @spindle_speed_match.setter def spindle_speed_match(self, spindle_speed_match): """ Sets the spindle_speed_match of this VolumeGroupSummary. True, if all drives have matching spindle speed. :param spindle_speed_match: The spindle_speed_match of this VolumeGroupSummary. :type: bool """ self._spindle_speed_match = spindle_speed_match @property def spindle_speed(self): """ Gets the spindle_speed of this VolumeGroupSummary. True, if all drives have matching spindle speed. :return: The spindle_speed of this VolumeGroupSummary. :rtype: int :required/optional: required """ return self._spindle_speed @spindle_speed.setter def spindle_speed(self, spindle_speed): """ Sets the spindle_speed of this VolumeGroupSummary. True, if all drives have matching spindle speed. :param spindle_speed: The spindle_speed of this VolumeGroupSummary. :type: int """ self._spindle_speed = spindle_speed @property def volume_group_security_type(self): """ Gets the volume_group_security_type of this VolumeGroupSummary. This field is used to specify the volume group security type. :return: The volume_group_security_type of this VolumeGroupSummary. :rtype: str :required/optional: required """ return self._volume_group_security_type @volume_group_security_type.setter def volume_group_security_type(self, volume_group_security_type): """ Sets the volume_group_security_type of this VolumeGroupSummary. This field is used to specify the volume group security type. :param volume_group_security_type: The volume_group_security_type of this VolumeGroupSummary. :type: str """ allowed_values = ["unknown", "none", "capable", "enabled", "__UNDEFINED"] if volume_group_security_type not in allowed_values: raise ValueError( "Invalid value for `volume_group_security_type`, must be one of {0}" .format(allowed_values) ) self._volume_group_security_type = volume_group_security_type @property def drawer_loss_protection(self): """ Gets the drawer_loss_protection of this VolumeGroupSummary. This field is set to true when the volume group has drawer loss protection; otherwise it is set to false :return: The drawer_loss_protection of this VolumeGroupSummary. :rtype: bool :required/optional: required """ return self._drawer_loss_protection @drawer_loss_protection.setter def drawer_loss_protection(self, drawer_loss_protection): """ Sets the drawer_loss_protection of this VolumeGroupSummary. This field is set to true when the volume group has drawer loss protection; otherwise it is set to false :param drawer_loss_protection: The drawer_loss_protection of this VolumeGroupSummary. :type: bool """ self._drawer_loss_protection = drawer_loss_protection @property def drive_media_type(self): """ Gets the drive_media_type of this VolumeGroupSummary. This field is set to the desired drive media type of the drive. :return: The drive_media_type of this VolumeGroupSummary. :rtype: str :required/optional: required """ return self._drive_media_type @drive_media_type.setter def drive_media_type(self, drive_media_type): """ Sets the drive_media_type of this VolumeGroupSummary. This field is set to the desired drive media type of the drive. :param drive_media_type: The drive_media_type of this VolumeGroupSummary. :type: str """ allowed_values = ["all", "unknown", "hdd", "ssd", "__UNDEFINED"] if drive_media_type not in allowed_values: raise ValueError( "Invalid value for `drive_media_type`, must be one of {0}" .format(allowed_values) ) self._drive_media_type = drive_media_type @property def protection_information_capable(self): """ Gets the protection_information_capable of this VolumeGroupSummary. True when all drives in the volume group are PI capable. :return: The protection_information_capable of this VolumeGroupSummary. :rtype: bool :required/optional: required """ return self._protection_information_capable @protection_information_capable.setter def protection_information_capable(self, protection_information_capable): """ Sets the protection_information_capable of this VolumeGroupSummary. True when all drives in the volume group are PI capable. :param protection_information_capable: The protection_information_capable of this VolumeGroupSummary. :type: bool """ self._protection_information_capable = protection_information_capable @property def drive_block_format(self): """ Gets the drive_block_format of this VolumeGroupSummary. Identifies the drive block format of the volume candidate. :return: The drive_block_format of this VolumeGroupSummary. :rtype: str :required/optional: required """ return self._drive_block_format @drive_block_format.setter def drive_block_format(self, drive_block_format): """ Sets the drive_block_format of this VolumeGroupSummary. Identifies the drive block format of the volume candidate. :param drive_block_format: The drive_block_format of this VolumeGroupSummary. :type: str """ allowed_values = ["unknown", "allNative", "allEmulated", "mixed", "__UNDEFINED"] if drive_block_format not in allowed_values: raise ValueError( "Invalid value for `drive_block_format`, must be one of {0}" .format(allowed_values) ) self._drive_block_format = drive_block_format @property def volume_group_security_level(self): """ Gets the volume_group_security_level of this VolumeGroupSummary. Refines the information in the securityType field to describe the set of drives. :return: The volume_group_security_level of this VolumeGroupSummary. :rtype: str :required/optional: required """ return self._volume_group_security_level @volume_group_security_level.setter def volume_group_security_level(self, volume_group_security_level): """ Sets the volume_group_security_level of this VolumeGroupSummary. Refines the information in the securityType field to describe the set of drives. :param volume_group_security_level: The volume_group_security_level of this VolumeGroupSummary. :type: str """ allowed_values = ["unknown", "none", "mixed", "fde", "fips", "__UNDEFINED"] if volume_group_security_level not in allowed_values: raise ValueError( "Invalid value for `volume_group_security_level`, must be one of {0}" .format(allowed_values) ) self._volume_group_security_level = volume_group_security_level
[docs] 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
[docs] 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