Source code for netapp.santricity.models.v2.pool_qos_response

# coding: utf-8

"""
PoolQosResponse.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 PoolQosResponse(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ PoolQosResponse - 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 = { 'pool_id': 'str', 'name': 'str', 'pool': 'VolumeGroupEx', 'flash_cache_capable': 'bool', 'data_assurance_capable': 'bool', 'encrypted': 'bool', 'thin_provisioning_capable': 'bool', 'spindle_speed': 'str', 'raid_level': 'str', 'available_free_extent_capacities': 'list[int]' } self.attribute_map = { 'pool_id': 'poolId', 'name': 'name', 'pool': 'pool', 'flash_cache_capable': 'flashCacheCapable', 'data_assurance_capable': 'dataAssuranceCapable', 'encrypted': 'encrypted', 'thin_provisioning_capable': 'thinProvisioningCapable', 'spindle_speed': 'spindleSpeed', 'raid_level': 'raidLevel', 'available_free_extent_capacities': 'availableFreeExtentCapacities' } self._pool_id = None self._name = None self._pool = None self._flash_cache_capable = None self._data_assurance_capable = None self._encrypted = None self._thin_provisioning_capable = None self._spindle_speed = None self._raid_level = None self._available_free_extent_capacities = None @property def pool_id(self): """ Gets the pool_id of this PoolQosResponse. The pool unique identifier :return: The pool_id of this PoolQosResponse. :rtype: str :required/optional: optional """ return self._pool_id @pool_id.setter def pool_id(self, pool_id): """ Sets the pool_id of this PoolQosResponse. The pool unique identifier :param pool_id: The pool_id of this PoolQosResponse. :type: str """ self._pool_id = pool_id @property def name(self): """ Gets the name of this PoolQosResponse. The pool name :return: The name of this PoolQosResponse. :rtype: str :required/optional: optional """ return self._name @name.setter def name(self, name): """ Sets the name of this PoolQosResponse. The pool name :param name: The name of this PoolQosResponse. :type: str """ self._name = name @property def pool(self): """ Gets the pool of this PoolQosResponse. :return: The pool of this PoolQosResponse. :rtype: VolumeGroupEx :required/optional: optional """ return self._pool @pool.setter def pool(self, pool): """ Sets the pool of this PoolQosResponse. :param pool: The pool of this PoolQosResponse. :type: VolumeGroupEx """ self._pool = pool @property def flash_cache_capable(self): """ Gets the flash_cache_capable of this PoolQosResponse. True if the pool supports flashCaching created volumes :return: The flash_cache_capable of this PoolQosResponse. :rtype: bool :required/optional: optional """ return self._flash_cache_capable @flash_cache_capable.setter def flash_cache_capable(self, flash_cache_capable): """ Sets the flash_cache_capable of this PoolQosResponse. True if the pool supports flashCaching created volumes :param flash_cache_capable: The flash_cache_capable of this PoolQosResponse. :type: bool """ self._flash_cache_capable = flash_cache_capable @property def data_assurance_capable(self): """ Gets the data_assurance_capable of this PoolQosResponse. True if created volumes can have dataAssurance enabled :return: The data_assurance_capable of this PoolQosResponse. :rtype: bool :required/optional: optional """ return self._data_assurance_capable @data_assurance_capable.setter def data_assurance_capable(self, data_assurance_capable): """ Sets the data_assurance_capable of this PoolQosResponse. True if created volumes can have dataAssurance enabled :param data_assurance_capable: The data_assurance_capable of this PoolQosResponse. :type: bool """ self._data_assurance_capable = data_assurance_capable @property def encrypted(self): """ Gets the encrypted of this PoolQosResponse. True if the pool supports encryption :return: The encrypted of this PoolQosResponse. :rtype: bool :required/optional: optional """ return self._encrypted @encrypted.setter def encrypted(self, encrypted): """ Sets the encrypted of this PoolQosResponse. True if the pool supports encryption :param encrypted: The encrypted of this PoolQosResponse. :type: bool """ self._encrypted = encrypted @property def thin_provisioning_capable(self): """ Gets the thin_provisioning_capable of this PoolQosResponse. True if thin provisioned volumes can be defined on this pool :return: The thin_provisioning_capable of this PoolQosResponse. :rtype: bool :required/optional: optional """ return self._thin_provisioning_capable @thin_provisioning_capable.setter def thin_provisioning_capable(self, thin_provisioning_capable): """ Sets the thin_provisioning_capable of this PoolQosResponse. True if thin provisioned volumes can be defined on this pool :param thin_provisioning_capable: The thin_provisioning_capable of this PoolQosResponse. :type: bool """ self._thin_provisioning_capable = thin_provisioning_capable @property def spindle_speed(self): """ Gets the spindle_speed of this PoolQosResponse. The normalized spindle speed for the drives on this pool :return: The spindle_speed of this PoolQosResponse. :rtype: str :required/optional: optional """ return self._spindle_speed @spindle_speed.setter def spindle_speed(self, spindle_speed): """ Sets the spindle_speed of this PoolQosResponse. The normalized spindle speed for the drives on this pool :param spindle_speed: The spindle_speed of this PoolQosResponse. :type: str """ allowed_values = ["spindleSpeedUnknown", "spindleSpeedSSD", "spindleSpeed5400", "spindleSpeed7200", "spindleSpeed10k", "spindleSpeed15k"] if spindle_speed not in allowed_values: raise ValueError( "Invalid value for `spindle_speed`, must be one of {0}" .format(allowed_values) ) self._spindle_speed = spindle_speed @property def raid_level(self): """ Gets the raid_level of this PoolQosResponse. The normalized RAID Level :return: The raid_level of this PoolQosResponse. :rtype: str :required/optional: optional """ return self._raid_level @raid_level.setter def raid_level(self, raid_level): """ Sets the raid_level of this PoolQosResponse. The normalized RAID Level :param raid_level: The raid_level of this PoolQosResponse. :type: str """ allowed_values = ["raid0", "raid1", "raid5", "raid6", "raidDiskPool", "unknown"] if raid_level not in allowed_values: raise ValueError( "Invalid value for `raid_level`, must be one of {0}" .format(allowed_values) ) self._raid_level = raid_level @property def available_free_extent_capacities(self): """ Gets the available_free_extent_capacities of this PoolQosResponse. The available sections of freeSpace available, in descending order :return: The available_free_extent_capacities of this PoolQosResponse. :rtype: list[int] :required/optional: optional """ return self._available_free_extent_capacities @available_free_extent_capacities.setter def available_free_extent_capacities(self, available_free_extent_capacities): """ Sets the available_free_extent_capacities of this PoolQosResponse. The available sections of freeSpace available, in descending order :param available_free_extent_capacities: The available_free_extent_capacities of this PoolQosResponse. :type: list[int] """ self._available_free_extent_capacities = available_free_extent_capacities
[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