# coding: utf-8
"""
VolumePerms.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 VolumePerms(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
VolumePerms - 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 = {
'map_to_lun': 'bool', # (required parameter)
'snap_shot': 'bool', # (required parameter)
'format': 'bool', # (required parameter)
'reconfigure': 'bool', # (required parameter)
'mirror_primary': 'bool', # (required parameter)
'mirror_secondary': 'bool', # (required parameter)
'copy_source': 'bool', # (required parameter)
'copy_target': 'bool', # (required parameter)
'readable': 'bool', # (required parameter)
'writable': 'bool', # (required parameter)
'rollback': 'bool', # (required parameter)
'mirror_sync': 'bool', # (required parameter)
'new_image': 'bool', # (required parameter)
'allow_dve': 'bool', # (required parameter)
'allow_dss': 'bool', # (required parameter)
'concat_volume_member': 'bool', # (required parameter)
'flash_read_cache': 'bool', # (required parameter)
'async_mirror_primary': 'bool', # (required parameter)
'async_mirror_secondary': 'bool', # (required parameter)
'pit_group': 'bool', # (required parameter)
'cache_parameters_changeable': 'bool', # (required parameter)
'allow_thin_manual_expansion': 'bool', # (required parameter)
'allow_thin_growth_parameters_change': 'bool'
}
self.attribute_map = {
'map_to_lun': 'mapToLUN', # (required parameter)
'snap_shot': 'snapShot', # (required parameter)
'format': 'format', # (required parameter)
'reconfigure': 'reconfigure', # (required parameter)
'mirror_primary': 'mirrorPrimary', # (required parameter)
'mirror_secondary': 'mirrorSecondary', # (required parameter)
'copy_source': 'copySource', # (required parameter)
'copy_target': 'copyTarget', # (required parameter)
'readable': 'readable', # (required parameter)
'writable': 'writable', # (required parameter)
'rollback': 'rollback', # (required parameter)
'mirror_sync': 'mirrorSync', # (required parameter)
'new_image': 'newImage', # (required parameter)
'allow_dve': 'allowDVE', # (required parameter)
'allow_dss': 'allowDSS', # (required parameter)
'concat_volume_member': 'concatVolumeMember', # (required parameter)
'flash_read_cache': 'flashReadCache', # (required parameter)
'async_mirror_primary': 'asyncMirrorPrimary', # (required parameter)
'async_mirror_secondary': 'asyncMirrorSecondary', # (required parameter)
'pit_group': 'pitGroup', # (required parameter)
'cache_parameters_changeable': 'cacheParametersChangeable', # (required parameter)
'allow_thin_manual_expansion': 'allowThinManualExpansion', # (required parameter)
'allow_thin_growth_parameters_change': 'allowThinGrowthParametersChange'
}
self._map_to_lun = None
self._snap_shot = None
self._format = None
self._reconfigure = None
self._mirror_primary = None
self._mirror_secondary = None
self._copy_source = None
self._copy_target = None
self._readable = None
self._writable = None
self._rollback = None
self._mirror_sync = None
self._new_image = None
self._allow_dve = None
self._allow_dss = None
self._concat_volume_member = None
self._flash_read_cache = None
self._async_mirror_primary = None
self._async_mirror_secondary = None
self._pit_group = None
self._cache_parameters_changeable = None
self._allow_thin_manual_expansion = None
self._allow_thin_growth_parameters_change = None
@property
def map_to_lun(self):
"""
Gets the map_to_lun of this VolumePerms.
Can this volume be mapped to a LUN
:return: The map_to_lun of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._map_to_lun
@map_to_lun.setter
def map_to_lun(self, map_to_lun):
"""
Sets the map_to_lun of this VolumePerms.
Can this volume be mapped to a LUN
:param map_to_lun: The map_to_lun of this VolumePerms.
:type: bool
"""
self._map_to_lun = map_to_lun
@property
def snap_shot(self):
"""
Gets the snap_shot of this VolumePerms.
This is true if the volume can have a snapshot.
:return: The snap_shot of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._snap_shot
@snap_shot.setter
def snap_shot(self, snap_shot):
"""
Sets the snap_shot of this VolumePerms.
This is true if the volume can have a snapshot.
:param snap_shot: The snap_shot of this VolumePerms.
:type: bool
"""
self._snap_shot = snap_shot
@property
def format(self):
"""
Gets the format of this VolumePerms.
This is true if the volume can be formatted.
:return: The format of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._format
@format.setter
def format(self, format):
"""
Sets the format of this VolumePerms.
This is true if the volume can be formatted.
:param format: The format of this VolumePerms.
:type: bool
"""
self._format = format
@property
def reconfigure(self):
"""
Gets the reconfigure of this VolumePerms.
This is true if the volume can be reconfigured (DVE, DCE, DRM, etc.).
:return: The reconfigure of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._reconfigure
@reconfigure.setter
def reconfigure(self, reconfigure):
"""
Sets the reconfigure of this VolumePerms.
This is true if the volume can be reconfigured (DVE, DCE, DRM, etc.).
:param reconfigure: The reconfigure of this VolumePerms.
:type: bool
"""
self._reconfigure = reconfigure
@property
def mirror_primary(self):
"""
Gets the mirror_primary of this VolumePerms.
This is true if the volume can be a primary mirror.
:return: The mirror_primary of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._mirror_primary
@mirror_primary.setter
def mirror_primary(self, mirror_primary):
"""
Sets the mirror_primary of this VolumePerms.
This is true if the volume can be a primary mirror.
:param mirror_primary: The mirror_primary of this VolumePerms.
:type: bool
"""
self._mirror_primary = mirror_primary
@property
def mirror_secondary(self):
"""
Gets the mirror_secondary of this VolumePerms.
This is true if the volume can be a secondary mirror.
:return: The mirror_secondary of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._mirror_secondary
@mirror_secondary.setter
def mirror_secondary(self, mirror_secondary):
"""
Sets the mirror_secondary of this VolumePerms.
This is true if the volume can be a secondary mirror.
:param mirror_secondary: The mirror_secondary of this VolumePerms.
:type: bool
"""
self._mirror_secondary = mirror_secondary
@property
def copy_source(self):
"""
Gets the copy_source of this VolumePerms.
This is true if the volume can be the source for a copy.
:return: The copy_source of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._copy_source
@copy_source.setter
def copy_source(self, copy_source):
"""
Sets the copy_source of this VolumePerms.
This is true if the volume can be the source for a copy.
:param copy_source: The copy_source of this VolumePerms.
:type: bool
"""
self._copy_source = copy_source
@property
def copy_target(self):
"""
Gets the copy_target of this VolumePerms.
This is true if the volume can be the target for a copy.
:return: The copy_target of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._copy_target
@copy_target.setter
def copy_target(self, copy_target):
"""
Sets the copy_target of this VolumePerms.
This is true if the volume can be the target for a copy.
:param copy_target: The copy_target of this VolumePerms.
:type: bool
"""
self._copy_target = copy_target
@property
def readable(self):
"""
Gets the readable of this VolumePerms.
This is true if the volume can be read by a host.
:return: The readable of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._readable
@readable.setter
def readable(self, readable):
"""
Sets the readable of this VolumePerms.
This is true if the volume can be read by a host.
:param readable: The readable of this VolumePerms.
:type: bool
"""
self._readable = readable
@property
def writable(self):
"""
Gets the writable of this VolumePerms.
Can this volume be written by a host
:return: The writable of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._writable
@writable.setter
def writable(self, writable):
"""
Sets the writable of this VolumePerms.
Can this volume be written by a host
:param writable: The writable of this VolumePerms.
:type: bool
"""
self._writable = writable
@property
def rollback(self):
"""
Gets the rollback of this VolumePerms.
Set to true if a snapshot rollback can be applied to this volume.
:return: The rollback of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._rollback
@rollback.setter
def rollback(self, rollback):
"""
Sets the rollback of this VolumePerms.
Set to true if a snapshot rollback can be applied to this volume.
:param rollback: The rollback of this VolumePerms.
:type: bool
"""
self._rollback = rollback
@property
def mirror_sync(self):
"""
Gets the mirror_sync of this VolumePerms.
Set to true if a remote volume mirror can actively synchronize this volume's data
:return: The mirror_sync of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._mirror_sync
@mirror_sync.setter
def mirror_sync(self, mirror_sync):
"""
Sets the mirror_sync of this VolumePerms.
Set to true if a remote volume mirror can actively synchronize this volume's data
:param mirror_sync: The mirror_sync of this VolumePerms.
:type: bool
"""
self._mirror_sync = mirror_sync
@property
def new_image(self):
"""
Gets the new_image of this VolumePerms.
Set to true when a new point-in-time image can be taken of this volume, either by creating a new snapshot or re-creating an existing snapshot.
:return: The new_image of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._new_image
@new_image.setter
def new_image(self, new_image):
"""
Sets the new_image of this VolumePerms.
Set to true when a new point-in-time image can be taken of this volume, either by creating a new snapshot or re-creating an existing snapshot.
:param new_image: The new_image of this VolumePerms.
:type: bool
"""
self._new_image = new_image
@property
def allow_dve(self):
"""
Gets the allow_dve of this VolumePerms.
If true, this volume can be expanded via DVE. If false, this will still allow general reconfigures (providing the 'reconfigure' field is true), but disallow DVE specifically.
:return: The allow_dve of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._allow_dve
@allow_dve.setter
def allow_dve(self, allow_dve):
"""
Sets the allow_dve of this VolumePerms.
If true, this volume can be expanded via DVE. If false, this will still allow general reconfigures (providing the 'reconfigure' field is true), but disallow DVE specifically.
:param allow_dve: The allow_dve of this VolumePerms.
:type: bool
"""
self._allow_dve = allow_dve
@property
def allow_dss(self):
"""
Gets the allow_dss of this VolumePerms.
If true, this volume can undergo a segment size change (DSS). If false, this will still allow general reconfigures (providing the 'reconfigure' field is true), but disallow DSS specifically.
:return: The allow_dss of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._allow_dss
@allow_dss.setter
def allow_dss(self, allow_dss):
"""
Sets the allow_dss of this VolumePerms.
If true, this volume can undergo a segment size change (DSS). If false, this will still allow general reconfigures (providing the 'reconfigure' field is true), but disallow DSS specifically.
:param allow_dss: The allow_dss of this VolumePerms.
:type: bool
"""
self._allow_dss = allow_dss
@property
def concat_volume_member(self):
"""
Gets the concat_volume_member of this VolumePerms.
If true, this volume can be a member of a ConcatVolume.
:return: The concat_volume_member of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._concat_volume_member
@concat_volume_member.setter
def concat_volume_member(self, concat_volume_member):
"""
Sets the concat_volume_member of this VolumePerms.
If true, this volume can be a member of a ConcatVolume.
:param concat_volume_member: The concat_volume_member of this VolumePerms.
:type: bool
"""
self._concat_volume_member = concat_volume_member
@property
def flash_read_cache(self):
"""
Gets the flash_read_cache of this VolumePerms.
If true, this volume can have flash read cache enabled.
:return: The flash_read_cache of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._flash_read_cache
@flash_read_cache.setter
def flash_read_cache(self, flash_read_cache):
"""
Sets the flash_read_cache of this VolumePerms.
If true, this volume can have flash read cache enabled.
:param flash_read_cache: The flash_read_cache of this VolumePerms.
:type: bool
"""
self._flash_read_cache = flash_read_cache
@property
def async_mirror_primary(self):
"""
Gets the async_mirror_primary of this VolumePerms.
If true, this volume can be an Async RVM primary.
:return: The async_mirror_primary of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._async_mirror_primary
@async_mirror_primary.setter
def async_mirror_primary(self, async_mirror_primary):
"""
Sets the async_mirror_primary of this VolumePerms.
If true, this volume can be an Async RVM primary.
:param async_mirror_primary: The async_mirror_primary of this VolumePerms.
:type: bool
"""
self._async_mirror_primary = async_mirror_primary
@property
def async_mirror_secondary(self):
"""
Gets the async_mirror_secondary of this VolumePerms.
If true, this volume can be an Async RVM primary.
:return: The async_mirror_secondary of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._async_mirror_secondary
@async_mirror_secondary.setter
def async_mirror_secondary(self, async_mirror_secondary):
"""
Sets the async_mirror_secondary of this VolumePerms.
If true, this volume can be an Async RVM primary.
:param async_mirror_secondary: The async_mirror_secondary of this VolumePerms.
:type: bool
"""
self._async_mirror_secondary = async_mirror_secondary
@property
def pit_group(self):
"""
Gets the pit_group of this VolumePerms.
If true, a PiT group can be created on this volume.
:return: The pit_group of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._pit_group
@pit_group.setter
def pit_group(self, pit_group):
"""
Sets the pit_group of this VolumePerms.
If true, a PiT group can be created on this volume.
:param pit_group: The pit_group of this VolumePerms.
:type: bool
"""
self._pit_group = pit_group
@property
def cache_parameters_changeable(self):
"""
Gets the cache_parameters_changeable of this VolumePerms.
If true, cache parameters may be changed on this volume.
:return: The cache_parameters_changeable of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._cache_parameters_changeable
@cache_parameters_changeable.setter
def cache_parameters_changeable(self, cache_parameters_changeable):
"""
Sets the cache_parameters_changeable of this VolumePerms.
If true, cache parameters may be changed on this volume.
:param cache_parameters_changeable: The cache_parameters_changeable of this VolumePerms.
:type: bool
"""
self._cache_parameters_changeable = cache_parameters_changeable
@property
def allow_thin_manual_expansion(self):
"""
Gets the allow_thin_manual_expansion of this VolumePerms.
If true, changes to manual mode while the thin volume is in an Asynchronous Mirror Group (AMG) are allowed.
:return: The allow_thin_manual_expansion of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._allow_thin_manual_expansion
@allow_thin_manual_expansion.setter
def allow_thin_manual_expansion(self, allow_thin_manual_expansion):
"""
Sets the allow_thin_manual_expansion of this VolumePerms.
If true, changes to manual mode while the thin volume is in an Asynchronous Mirror Group (AMG) are allowed.
:param allow_thin_manual_expansion: The allow_thin_manual_expansion of this VolumePerms.
:type: bool
"""
self._allow_thin_manual_expansion = allow_thin_manual_expansion
@property
def allow_thin_growth_parameters_change(self):
"""
Gets the allow_thin_growth_parameters_change of this VolumePerms.
If true, changes to the growth parameters (quota or warning threshold values) while the thin volume is in an Asynchronous Mirror Group (AMG) are allowed.
:return: The allow_thin_growth_parameters_change of this VolumePerms.
:rtype: bool
:required/optional: required
"""
return self._allow_thin_growth_parameters_change
@allow_thin_growth_parameters_change.setter
def allow_thin_growth_parameters_change(self, allow_thin_growth_parameters_change):
"""
Sets the allow_thin_growth_parameters_change of this VolumePerms.
If true, changes to the growth parameters (quota or warning threshold values) while the thin volume is in an Asynchronous Mirror Group (AMG) are allowed.
:param allow_thin_growth_parameters_change: The allow_thin_growth_parameters_change of this VolumePerms.
:type: bool
"""
self._allow_thin_growth_parameters_change = allow_thin_growth_parameters_change
[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