# coding: utf-8
"""
VolumeCopy.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 VolumeCopy(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
VolumeCopy - 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 = {
'world_wide_name': 'str', # (required parameter)
'volcopy_handle': 'int', # (required parameter)
'volcopy_ref': 'str', # (required parameter)
'status': 'str', # (required parameter)
'source_volume': 'str', # (required parameter)
'target_volume': 'str', # (required parameter)
'current_manager': 'str', # (required parameter)
'idle_target_write_prot': 'bool', # (required parameter)
'copy_complete_time': 'int', # (required parameter)
'copy_start_time': 'int', # (required parameter)
'copy_priority': 'str', # (required parameter)
'reserved1': 'str',
'clone_copy': 'bool', # (required parameter)
'pg_ref': 'str', # (required parameter)
'id': 'str'
}
self.attribute_map = {
'world_wide_name': 'worldWideName', # (required parameter)
'volcopy_handle': 'volcopyHandle', # (required parameter)
'volcopy_ref': 'volcopyRef', # (required parameter)
'status': 'status', # (required parameter)
'source_volume': 'sourceVolume', # (required parameter)
'target_volume': 'targetVolume', # (required parameter)
'current_manager': 'currentManager', # (required parameter)
'idle_target_write_prot': 'idleTargetWriteProt', # (required parameter)
'copy_complete_time': 'copyCompleteTime', # (required parameter)
'copy_start_time': 'copyStartTime', # (required parameter)
'copy_priority': 'copyPriority', # (required parameter)
'reserved1': 'reserved1',
'clone_copy': 'cloneCopy', # (required parameter)
'pg_ref': 'pgRef', # (required parameter)
'id': 'id'
}
self._world_wide_name = None
self._volcopy_handle = None
self._volcopy_ref = None
self._status = None
self._source_volume = None
self._target_volume = None
self._current_manager = None
self._idle_target_write_prot = None
self._copy_complete_time = None
self._copy_start_time = None
self._copy_priority = None
self._reserved1 = None
self._clone_copy = None
self._pg_ref = None
self._id = None
@property
def world_wide_name(self):
"""
Gets the world_wide_name of this VolumeCopy.
The World Wide Name of the volume copy.
:return: The world_wide_name of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._world_wide_name
@world_wide_name.setter
def world_wide_name(self, world_wide_name):
"""
Sets the world_wide_name of this VolumeCopy.
The World Wide Name of the volume copy.
:param world_wide_name: The world_wide_name of this VolumeCopy.
:type: str
"""
self._world_wide_name = world_wide_name
@property
def volcopy_handle(self):
"""
Gets the volcopy_handle of this VolumeCopy.
The Volume Copy ID(ssid of proxy).
:return: The volcopy_handle of this VolumeCopy.
:rtype: int
:required/optional: required
"""
return self._volcopy_handle
@volcopy_handle.setter
def volcopy_handle(self, volcopy_handle):
"""
Sets the volcopy_handle of this VolumeCopy.
The Volume Copy ID(ssid of proxy).
:param volcopy_handle: The volcopy_handle of this VolumeCopy.
:type: int
"""
self._volcopy_handle = volcopy_handle
@property
def volcopy_ref(self):
"""
Gets the volcopy_ref of this VolumeCopy.
Reference (key) for copy.
:return: The volcopy_ref of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._volcopy_ref
@volcopy_ref.setter
def volcopy_ref(self, volcopy_ref):
"""
Sets the volcopy_ref of this VolumeCopy.
Reference (key) for copy.
:param volcopy_ref: The volcopy_ref of this VolumeCopy.
:type: str
"""
self._volcopy_ref = volcopy_ref
@property
def status(self):
"""
Gets the status of this VolumeCopy.
Indicates status of copy.
:return: The status of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._status
@status.setter
def status(self, status):
"""
Sets the status of this VolumeCopy.
Indicates status of copy.
:param status: The status of this VolumeCopy.
:type: str
"""
allowed_values = ["inProgress", "complete", "halted", "failed", "pending", "__UNDEFINED"]
if status not in allowed_values:
raise ValueError(
"Invalid value for `status`, must be one of {0}"
.format(allowed_values)
)
self._status = status
@property
def source_volume(self):
"""
Gets the source_volume of this VolumeCopy.
Source volume reference.
:return: The source_volume of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._source_volume
@source_volume.setter
def source_volume(self, source_volume):
"""
Sets the source_volume of this VolumeCopy.
Source volume reference.
:param source_volume: The source_volume of this VolumeCopy.
:type: str
"""
self._source_volume = source_volume
@property
def target_volume(self):
"""
Gets the target_volume of this VolumeCopy.
Target volume reference.
:return: The target_volume of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._target_volume
@target_volume.setter
def target_volume(self, target_volume):
"""
Sets the target_volume of this VolumeCopy.
Target volume reference.
:param target_volume: The target_volume of this VolumeCopy.
:type: str
"""
self._target_volume = target_volume
@property
def current_manager(self):
"""
Gets the current_manager of this VolumeCopy.
Current owner of copy.
:return: The current_manager of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._current_manager
@current_manager.setter
def current_manager(self, current_manager):
"""
Sets the current_manager of this VolumeCopy.
Current owner of copy.
:param current_manager: The current_manager of this VolumeCopy.
:type: str
"""
self._current_manager = current_manager
@property
def idle_target_write_prot(self):
"""
Gets the idle_target_write_prot of this VolumeCopy.
Apply write protection to target volume when copy is idle (true/false).
:return: The idle_target_write_prot of this VolumeCopy.
:rtype: bool
:required/optional: required
"""
return self._idle_target_write_prot
@idle_target_write_prot.setter
def idle_target_write_prot(self, idle_target_write_prot):
"""
Sets the idle_target_write_prot of this VolumeCopy.
Apply write protection to target volume when copy is idle (true/false).
:param idle_target_write_prot: The idle_target_write_prot of this VolumeCopy.
:type: bool
"""
self._idle_target_write_prot = idle_target_write_prot
@property
def copy_complete_time(self):
"""
Gets the copy_complete_time of this VolumeCopy.
Time copy operation completed.
:return: The copy_complete_time of this VolumeCopy.
:rtype: int
:required/optional: required
"""
return self._copy_complete_time
@copy_complete_time.setter
def copy_complete_time(self, copy_complete_time):
"""
Sets the copy_complete_time of this VolumeCopy.
Time copy operation completed.
:param copy_complete_time: The copy_complete_time of this VolumeCopy.
:type: int
"""
self._copy_complete_time = copy_complete_time
@property
def copy_start_time(self):
"""
Gets the copy_start_time of this VolumeCopy.
Time copy operation began.
:return: The copy_start_time of this VolumeCopy.
:rtype: int
:required/optional: required
"""
return self._copy_start_time
@copy_start_time.setter
def copy_start_time(self, copy_start_time):
"""
Sets the copy_start_time of this VolumeCopy.
Time copy operation began.
:param copy_start_time: The copy_start_time of this VolumeCopy.
:type: int
"""
self._copy_start_time = copy_start_time
@property
def copy_priority(self):
"""
Gets the copy_priority of this VolumeCopy.
Importance of copy operation.
:return: The copy_priority of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._copy_priority
@copy_priority.setter
def copy_priority(self, copy_priority):
"""
Sets the copy_priority of this VolumeCopy.
Importance of copy operation.
:param copy_priority: The copy_priority of this VolumeCopy.
:type: str
"""
allowed_values = ["priority0", "priority1", "priority2", "priority3", "priority4", "__UNDEFINED"]
if copy_priority not in allowed_values:
raise ValueError(
"Invalid value for `copy_priority`, must be one of {0}"
.format(allowed_values)
)
self._copy_priority = copy_priority
@property
def reserved1(self):
"""
Gets the reserved1 of this VolumeCopy.
:return: The reserved1 of this VolumeCopy.
:rtype: str
:required/optional: optional
"""
return self._reserved1
@reserved1.setter
def reserved1(self, reserved1):
"""
Sets the reserved1 of this VolumeCopy.
:param reserved1: The reserved1 of this VolumeCopy.
:type: str
"""
self._reserved1 = reserved1
@property
def clone_copy(self):
"""
Gets the clone_copy of this VolumeCopy.
The volume copy is a clone.
:return: The clone_copy of this VolumeCopy.
:rtype: bool
:required/optional: required
"""
return self._clone_copy
@clone_copy.setter
def clone_copy(self, clone_copy):
"""
Sets the clone_copy of this VolumeCopy.
The volume copy is a clone.
:param clone_copy: The clone_copy of this VolumeCopy.
:type: bool
"""
self._clone_copy = clone_copy
@property
def pg_ref(self):
"""
Gets the pg_ref of this VolumeCopy.
For clones based on PiT Groups, this will identify the PiT Group.
:return: The pg_ref of this VolumeCopy.
:rtype: str
:required/optional: required
"""
return self._pg_ref
@pg_ref.setter
def pg_ref(self, pg_ref):
"""
Sets the pg_ref of this VolumeCopy.
For clones based on PiT Groups, this will identify the PiT Group.
:param pg_ref: The pg_ref of this VolumeCopy.
:type: str
"""
self._pg_ref = pg_ref
@property
def id(self):
"""
Gets the id of this VolumeCopy.
:return: The id of this VolumeCopy.
:rtype: str
:required/optional: optional
"""
return self._id
@id.setter
def id(self, id):
"""
Sets the id of this VolumeCopy.
:param id: The id of this VolumeCopy.
:type: str
"""
self._id = id
[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