# coding: utf-8
"""
AsyncMirrorGroupMember.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 AsyncMirrorGroupMember(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
AsyncMirrorGroupMember - 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 = {
'member_ref': 'str', # (required parameter)
'mirror_group': 'str', # (required parameter)
'local_volume': 'str', # (required parameter)
'remote_volume': 'str', # (required parameter)
'member_state': 'str', # (required parameter)
'last_recovery_point_time': 'int', # (required parameter)
'over_utilization_warn_threshold': 'bool', # (required parameter)
'mirrored_local_capacity': 'int', # (required parameter)
'repository_volume': 'str', # (required parameter)
'world_wide_name': 'str', # (required parameter)
'volume_handle': 'int', # (required parameter)
'repository_full': 'bool', # (required parameter)
'id': 'str'
}
self.attribute_map = {
'member_ref': 'memberRef', # (required parameter)
'mirror_group': 'mirrorGroup', # (required parameter)
'local_volume': 'localVolume', # (required parameter)
'remote_volume': 'remoteVolume', # (required parameter)
'member_state': 'memberState', # (required parameter)
'last_recovery_point_time': 'lastRecoveryPointTime', # (required parameter)
'over_utilization_warn_threshold': 'overUtilizationWarnThreshold', # (required parameter)
'mirrored_local_capacity': 'mirroredLocalCapacity', # (required parameter)
'repository_volume': 'repositoryVolume', # (required parameter)
'world_wide_name': 'worldWideName', # (required parameter)
'volume_handle': 'volumeHandle', # (required parameter)
'repository_full': 'repositoryFull', # (required parameter)
'id': 'id'
}
self._member_ref = None
self._mirror_group = None
self._local_volume = None
self._remote_volume = None
self._member_state = None
self._last_recovery_point_time = None
self._over_utilization_warn_threshold = None
self._mirrored_local_capacity = None
self._repository_volume = None
self._world_wide_name = None
self._volume_handle = None
self._repository_full = None
self._id = None
@property
def member_ref(self):
"""
Gets the member_ref of this AsyncMirrorGroupMember.
The reference (key) for the group member.
:return: The member_ref of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: required
"""
return self._member_ref
@member_ref.setter
def member_ref(self, member_ref):
"""
Sets the member_ref of this AsyncMirrorGroupMember.
The reference (key) for the group member.
:param member_ref: The member_ref of this AsyncMirrorGroupMember.
:type: str
"""
self._member_ref = member_ref
@property
def mirror_group(self):
"""
Gets the mirror_group of this AsyncMirrorGroupMember.
The AMG with which this member is associated.
:return: The mirror_group of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: required
"""
return self._mirror_group
@mirror_group.setter
def mirror_group(self, mirror_group):
"""
Sets the mirror_group of this AsyncMirrorGroupMember.
The AMG with which this member is associated.
:param mirror_group: The mirror_group of this AsyncMirrorGroupMember.
:type: str
"""
self._mirror_group = mirror_group
@property
def local_volume(self):
"""
Gets the local_volume of this AsyncMirrorGroupMember.
The local volume for this mirror. This is the volume being mirrored if the AMG role is primary, otherwise this is the target of mirror synchronization.
:return: The local_volume of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: required
"""
return self._local_volume
@local_volume.setter
def local_volume(self, local_volume):
"""
Sets the local_volume of this AsyncMirrorGroupMember.
The local volume for this mirror. This is the volume being mirrored if the AMG role is primary, otherwise this is the target of mirror synchronization.
:param local_volume: The local_volume of this AsyncMirrorGroupMember.
:type: str
"""
self._local_volume = local_volume
@property
def remote_volume(self):
"""
Gets the remote_volume of this AsyncMirrorGroupMember.
The remote volume. This is the target of mirror synchronization on the remote array if the AMG role is primary, otherwise this is the volume on the remote array that is being mirrored.
:return: The remote_volume of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: required
"""
return self._remote_volume
@remote_volume.setter
def remote_volume(self, remote_volume):
"""
Sets the remote_volume of this AsyncMirrorGroupMember.
The remote volume. This is the target of mirror synchronization on the remote array if the AMG role is primary, otherwise this is the volume on the remote array that is being mirrored.
:param remote_volume: The remote_volume of this AsyncMirrorGroupMember.
:type: str
"""
self._remote_volume = remote_volume
@property
def member_state(self):
"""
Gets the member_state of this AsyncMirrorGroupMember.
The state of this mirror relationship (as known by this array).
:return: The member_state of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: required
"""
return self._member_state
@member_state.setter
def member_state(self, member_state):
"""
Sets the member_state of this AsyncMirrorGroupMember.
The state of this mirror relationship (as known by this array).
:param member_state: The member_state of this AsyncMirrorGroupMember.
:type: str
"""
allowed_values = ["unknown", "initialSync", "optimal", "failed", "incomplete", "orphan", "stopped", "__UNDEFINED"]
if member_state not in allowed_values:
raise ValueError(
"Invalid value for `member_state`, must be one of {0}"
.format(allowed_values)
)
self._member_state = member_state
@property
def last_recovery_point_time(self):
"""
Gets the last_recovery_point_time of this AsyncMirrorGroupMember.
The timestamp, represented in seconds since midnight GMT on January 1, 1970, of the last recovery point PiT on secondary. If no recovery point image exists, the value of this field will be ARVM_NO_RECOVERY_POINT_TIMESTAMP.
:return: The last_recovery_point_time of this AsyncMirrorGroupMember.
:rtype: int
:required/optional: required
"""
return self._last_recovery_point_time
@last_recovery_point_time.setter
def last_recovery_point_time(self, last_recovery_point_time):
"""
Sets the last_recovery_point_time of this AsyncMirrorGroupMember.
The timestamp, represented in seconds since midnight GMT on January 1, 1970, of the last recovery point PiT on secondary. If no recovery point image exists, the value of this field will be ARVM_NO_RECOVERY_POINT_TIMESTAMP.
:param last_recovery_point_time: The last_recovery_point_time of this AsyncMirrorGroupMember.
:type: int
"""
self._last_recovery_point_time = last_recovery_point_time
@property
def over_utilization_warn_threshold(self):
"""
Gets the over_utilization_warn_threshold of this AsyncMirrorGroupMember.
If true, the repository capacity utilized is over the warning threshold.
:return: The over_utilization_warn_threshold of this AsyncMirrorGroupMember.
:rtype: bool
:required/optional: required
"""
return self._over_utilization_warn_threshold
@over_utilization_warn_threshold.setter
def over_utilization_warn_threshold(self, over_utilization_warn_threshold):
"""
Sets the over_utilization_warn_threshold of this AsyncMirrorGroupMember.
If true, the repository capacity utilized is over the warning threshold.
:param over_utilization_warn_threshold: The over_utilization_warn_threshold of this AsyncMirrorGroupMember.
:type: bool
"""
self._over_utilization_warn_threshold = over_utilization_warn_threshold
@property
def mirrored_local_capacity(self):
"""
Gets the mirrored_local_capacity of this AsyncMirrorGroupMember.
The current local volume capacity that is being mirrored. This will be less than the actual local volume capacity if we have not yet reached a point where the next PiT can be taken and delta-logs resized (and until that point the expanded local capacity will not be opened up to host writes).
:return: The mirrored_local_capacity of this AsyncMirrorGroupMember.
:rtype: int
:required/optional: required
"""
return self._mirrored_local_capacity
@mirrored_local_capacity.setter
def mirrored_local_capacity(self, mirrored_local_capacity):
"""
Sets the mirrored_local_capacity of this AsyncMirrorGroupMember.
The current local volume capacity that is being mirrored. This will be less than the actual local volume capacity if we have not yet reached a point where the next PiT can be taken and delta-logs resized (and until that point the expanded local capacity will not be opened up to host writes).
:param mirrored_local_capacity: The mirrored_local_capacity of this AsyncMirrorGroupMember.
:type: int
"""
self._mirrored_local_capacity = mirrored_local_capacity
@property
def repository_volume(self):
"""
Gets the repository_volume of this AsyncMirrorGroupMember.
The metadata volume (Copy-on-Write / DeltaLog Repository) for this mirror.
:return: The repository_volume of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: required
"""
return self._repository_volume
@repository_volume.setter
def repository_volume(self, repository_volume):
"""
Sets the repository_volume of this AsyncMirrorGroupMember.
The metadata volume (Copy-on-Write / DeltaLog Repository) for this mirror.
:param repository_volume: The repository_volume of this AsyncMirrorGroupMember.
:type: str
"""
self._repository_volume = repository_volume
@property
def world_wide_name(self):
"""
Gets the world_wide_name of this AsyncMirrorGroupMember.
The WWN of the async mirror proxy.
:return: The world_wide_name of this AsyncMirrorGroupMember.
: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 AsyncMirrorGroupMember.
The WWN of the async mirror proxy.
:param world_wide_name: The world_wide_name of this AsyncMirrorGroupMember.
:type: str
"""
self._world_wide_name = world_wide_name
@property
def volume_handle(self):
"""
Gets the volume_handle of this AsyncMirrorGroupMember.
The SSID of the async mirror proxy.
:return: The volume_handle of this AsyncMirrorGroupMember.
:rtype: int
:required/optional: required
"""
return self._volume_handle
@volume_handle.setter
def volume_handle(self, volume_handle):
"""
Sets the volume_handle of this AsyncMirrorGroupMember.
The SSID of the async mirror proxy.
:param volume_handle: The volume_handle of this AsyncMirrorGroupMember.
:type: int
"""
self._volume_handle = volume_handle
@property
def repository_full(self):
"""
Gets the repository_full of this AsyncMirrorGroupMember.
If true, the repository is full (100% of available capacity utilized).
:return: The repository_full of this AsyncMirrorGroupMember.
:rtype: bool
:required/optional: required
"""
return self._repository_full
@repository_full.setter
def repository_full(self, repository_full):
"""
Sets the repository_full of this AsyncMirrorGroupMember.
If true, the repository is full (100% of available capacity utilized).
:param repository_full: The repository_full of this AsyncMirrorGroupMember.
:type: bool
"""
self._repository_full = repository_full
@property
def id(self):
"""
Gets the id of this AsyncMirrorGroupMember.
:return: The id of this AsyncMirrorGroupMember.
:rtype: str
:required/optional: optional
"""
return self._id
@id.setter
def id(self, id):
"""
Sets the id of this AsyncMirrorGroupMember.
:param id: The id of this AsyncMirrorGroupMember.
: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