# coding: utf-8
"""
VolumeUpdateRequest.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 VolumeUpdateRequest(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
VolumeUpdateRequest - 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 = {
'name': 'str',
'owning_controller_id': 'str',
'cache_settings': 'VolumeCacheSettings',
'flash_cache': 'bool',
'scan_settings': 'VolumeMediaScanParams',
'meta_tags': 'list[VolumeMetadataItem]'
}
self.attribute_map = {
'name': 'name',
'owning_controller_id': 'owningControllerId',
'cache_settings': 'cacheSettings',
'flash_cache': 'flashCache',
'scan_settings': 'scanSettings',
'meta_tags': 'metaTags'
}
self._name = None
self._owning_controller_id = None
self._cache_settings = None
self._flash_cache = None
self._scan_settings = None
self._meta_tags = None
@property
def name(self):
"""
Gets the name of this VolumeUpdateRequest.
The user-label to assign to the new volume.
:return: The name of this VolumeUpdateRequest.
:rtype: str
:required/optional: optional
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this VolumeUpdateRequest.
The user-label to assign to the new volume.
:param name: The name of this VolumeUpdateRequest.
:type: str
"""
self._name = name
@property
def owning_controller_id(self):
"""
Gets the owning_controller_id of this VolumeUpdateRequest.
Set the preferred owning controller
:return: The owning_controller_id of this VolumeUpdateRequest.
:rtype: str
:required/optional: optional
"""
return self._owning_controller_id
@owning_controller_id.setter
def owning_controller_id(self, owning_controller_id):
"""
Sets the owning_controller_id of this VolumeUpdateRequest.
Set the preferred owning controller
:param owning_controller_id: The owning_controller_id of this VolumeUpdateRequest.
:type: str
"""
self._owning_controller_id = owning_controller_id
@property
def cache_settings(self):
"""
Gets the cache_settings of this VolumeUpdateRequest.
Configure cache settings for the volume
:return: The cache_settings of this VolumeUpdateRequest.
:rtype: VolumeCacheSettings
:required/optional: optional
"""
return self._cache_settings
@cache_settings.setter
def cache_settings(self, cache_settings):
"""
Sets the cache_settings of this VolumeUpdateRequest.
Configure cache settings for the volume
:param cache_settings: The cache_settings of this VolumeUpdateRequest.
:type: VolumeCacheSettings
"""
self._cache_settings = cache_settings
@property
def flash_cache(self):
"""
Gets the flash_cache of this VolumeUpdateRequest.
If true, add the volume to the flashCache if one is defined. If false, remove from the flashCache if one exists.
:return: The flash_cache of this VolumeUpdateRequest.
:rtype: bool
:required/optional: optional
"""
return self._flash_cache
@flash_cache.setter
def flash_cache(self, flash_cache):
"""
Sets the flash_cache of this VolumeUpdateRequest.
If true, add the volume to the flashCache if one is defined. If false, remove from the flashCache if one exists.
:param flash_cache: The flash_cache of this VolumeUpdateRequest.
:type: bool
"""
self._flash_cache = flash_cache
@property
def scan_settings(self):
"""
Gets the scan_settings of this VolumeUpdateRequest.
Configure scan settings with regard to the controller's background media scan operation
:return: The scan_settings of this VolumeUpdateRequest.
:rtype: VolumeMediaScanParams
:required/optional: optional
"""
return self._scan_settings
@scan_settings.setter
def scan_settings(self, scan_settings):
"""
Sets the scan_settings of this VolumeUpdateRequest.
Configure scan settings with regard to the controller's background media scan operation
:param scan_settings: The scan_settings of this VolumeUpdateRequest.
:type: VolumeMediaScanParams
"""
self._scan_settings = scan_settings
@property
def meta_tags(self):
"""
Gets the meta_tags of this VolumeUpdateRequest.
Optional array of Meta Data tags for the volume.
:return: The meta_tags of this VolumeUpdateRequest.
:rtype: list[VolumeMetadataItem]
:required/optional: optional
"""
return self._meta_tags
@meta_tags.setter
def meta_tags(self, meta_tags):
"""
Sets the meta_tags of this VolumeUpdateRequest.
Optional array of Meta Data tags for the volume.
:param meta_tags: The meta_tags of this VolumeUpdateRequest.
:type: list[VolumeMetadataItem]
"""
self._meta_tags = meta_tags
[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