# coding: utf-8
"""
PITView.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 PITView(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
PITView - 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 = {
'view_ref': 'str', # (required parameter)
'world_wide_name': 'str', # (required parameter)
'base_vol': 'str', # (required parameter)
'base_pit': 'str', # (required parameter)
'bound_to_pit': 'bool', # (required parameter)
'access_mode': 'str', # (required parameter)
'label': 'str', # (required parameter)
'status': 'str', # (required parameter)
'current_manager': 'str', # (required parameter)
'preferred_manager': 'str', # (required parameter)
'repository_volume': 'str', # (required parameter)
'full_warn_threshold': 'int', # (required parameter)
'view_time': 'int', # (required parameter)
'view_sequence_number': 'int', # (required parameter)
'perms': 'VolumePerms', # (required parameter)
'volume_handle': 'int', # (required parameter)
'cluster_size': 'int', # (required parameter)
'max_repository_capacity': 'int', # (required parameter)
'unusable_repository_capacity': 'int', # (required parameter)
'membership': 'PITViewMembership', # (required parameter)
'mgmt_client_attribute': 'int', # (required parameter)
'offline': 'bool', # (required parameter)
'name': 'str',
'id': 'str'
}
self.attribute_map = {
'view_ref': 'viewRef', # (required parameter)
'world_wide_name': 'worldWideName', # (required parameter)
'base_vol': 'baseVol', # (required parameter)
'base_pit': 'basePIT', # (required parameter)
'bound_to_pit': 'boundToPIT', # (required parameter)
'access_mode': 'accessMode', # (required parameter)
'label': 'label', # (required parameter)
'status': 'status', # (required parameter)
'current_manager': 'currentManager', # (required parameter)
'preferred_manager': 'preferredManager', # (required parameter)
'repository_volume': 'repositoryVolume', # (required parameter)
'full_warn_threshold': 'fullWarnThreshold', # (required parameter)
'view_time': 'viewTime', # (required parameter)
'view_sequence_number': 'viewSequenceNumber', # (required parameter)
'perms': 'perms', # (required parameter)
'volume_handle': 'volumeHandle', # (required parameter)
'cluster_size': 'clusterSize', # (required parameter)
'max_repository_capacity': 'maxRepositoryCapacity', # (required parameter)
'unusable_repository_capacity': 'unusableRepositoryCapacity', # (required parameter)
'membership': 'membership', # (required parameter)
'mgmt_client_attribute': 'mgmtClientAttribute', # (required parameter)
'offline': 'offline', # (required parameter)
'name': 'name',
'id': 'id'
}
self._view_ref = None
self._world_wide_name = None
self._base_vol = None
self._base_pit = None
self._bound_to_pit = None
self._access_mode = None
self._label = None
self._status = None
self._current_manager = None
self._preferred_manager = None
self._repository_volume = None
self._full_warn_threshold = None
self._view_time = None
self._view_sequence_number = None
self._perms = None
self._volume_handle = None
self._cluster_size = None
self._max_repository_capacity = None
self._unusable_repository_capacity = None
self._membership = None
self._mgmt_client_attribute = None
self._offline = None
self._name = None
self._id = None
@property
def view_ref(self):
"""
Gets the view_ref of this PITView.
The reference (key) for this view.
:return: The view_ref of this PITView.
:rtype: str
:required/optional: required
"""
return self._view_ref
@view_ref.setter
def view_ref(self, view_ref):
"""
Sets the view_ref of this PITView.
The reference (key) for this view.
:param view_ref: The view_ref of this PITView.
:type: str
"""
self._view_ref = view_ref
@property
def world_wide_name(self):
"""
Gets the world_wide_name of this PITView.
The WWN of the view.
:return: The world_wide_name of this PITView.
: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 PITView.
The WWN of the view.
:param world_wide_name: The world_wide_name of this PITView.
:type: str
"""
self._world_wide_name = world_wide_name
@property
def base_vol(self):
"""
Gets the base_vol of this PITView.
A reference to the base volume with which this view is associated.
:return: The base_vol of this PITView.
:rtype: str
:required/optional: required
"""
return self._base_vol
@base_vol.setter
def base_vol(self, base_vol):
"""
Sets the base_vol of this PITView.
A reference to the base volume with which this view is associated.
:param base_vol: The base_vol of this PITView.
:type: str
"""
self._base_vol = base_vol
@property
def base_pit(self):
"""
Gets the base_pit of this PITView.
A reference to the particular PiT of the base for which this view applies. This field is only valid if the boundToPIT field is true.
:return: The base_pit of this PITView.
:rtype: str
:required/optional: required
"""
return self._base_pit
@base_pit.setter
def base_pit(self, base_pit):
"""
Sets the base_pit of this PITView.
A reference to the particular PiT of the base for which this view applies. This field is only valid if the boundToPIT field is true.
:param base_pit: The base_pit of this PITView.
:type: str
"""
self._base_pit = base_pit
@property
def bound_to_pit(self):
"""
Gets the bound_to_pit of this PITView.
If true, this flag indicates that the basePIT field is a valid reference to an associated PIT. If false, the view is disassociated from the PiT so the basePIT reference is invalid.
:return: The bound_to_pit of this PITView.
:rtype: bool
:required/optional: required
"""
return self._bound_to_pit
@bound_to_pit.setter
def bound_to_pit(self, bound_to_pit):
"""
Sets the bound_to_pit of this PITView.
If true, this flag indicates that the basePIT field is a valid reference to an associated PIT. If false, the view is disassociated from the PiT so the basePIT reference is invalid.
:param bound_to_pit: The bound_to_pit of this PITView.
:type: bool
"""
self._bound_to_pit = bound_to_pit
@property
def access_mode(self):
"""
Gets the access_mode of this PITView.
The view access mode.
:return: The access_mode of this PITView.
:rtype: str
:required/optional: required
"""
return self._access_mode
@access_mode.setter
def access_mode(self, access_mode):
"""
Sets the access_mode of this PITView.
The view access mode.
:param access_mode: The access_mode of this PITView.
:type: str
"""
allowed_values = ["modeUnknown", "readWrite", "readOnly", "__UNDEFINED"]
if access_mode not in allowed_values:
raise ValueError(
"Invalid value for `access_mode`, must be one of {0}"
.format(allowed_values)
)
self._access_mode = access_mode
@property
def label(self):
"""
Gets the label of this PITView.
The name of the view.
:return: The label of this PITView.
:rtype: str
:required/optional: required
"""
return self._label
@label.setter
def label(self, label):
"""
Sets the label of this PITView.
The name of the view.
:param label: The label of this PITView.
:type: str
"""
self._label = label
@property
def status(self):
"""
Gets the status of this PITView.
The view status.
:return: The status of this PITView.
:rtype: str
:required/optional: required
"""
return self._status
@status.setter
def status(self, status):
"""
Sets the status of this PITView.
The view status.
:param status: The status of this PITView.
:type: str
"""
allowed_values = ["unknown", "optimal", "stopped", "failed", "overThreshold", "full", "__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 current_manager(self):
"""
Gets the current_manager of this PITView.
The current owner of the view.
:return: The current_manager of this PITView.
:rtype: str
:required/optional: required
"""
return self._current_manager
@current_manager.setter
def current_manager(self, current_manager):
"""
Sets the current_manager of this PITView.
The current owner of the view.
:param current_manager: The current_manager of this PITView.
:type: str
"""
self._current_manager = current_manager
@property
def preferred_manager(self):
"""
Gets the preferred_manager of this PITView.
The preferred owner of the view.
:return: The preferred_manager of this PITView.
:rtype: str
:required/optional: required
"""
return self._preferred_manager
@preferred_manager.setter
def preferred_manager(self, preferred_manager):
"""
Sets the preferred_manager of this PITView.
The preferred owner of the view.
:param preferred_manager: The preferred_manager of this PITView.
:type: str
"""
self._preferred_manager = preferred_manager
@property
def repository_volume(self):
"""
Gets the repository_volume of this PITView.
The copy-on-write repository for this view.
:return: The repository_volume of this PITView.
:rtype: str
:required/optional: required
"""
return self._repository_volume
@repository_volume.setter
def repository_volume(self, repository_volume):
"""
Sets the repository_volume of this PITView.
The copy-on-write repository for this view.
:param repository_volume: The repository_volume of this PITView.
:type: str
"""
self._repository_volume = repository_volume
@property
def full_warn_threshold(self):
"""
Gets the full_warn_threshold of this PITView.
The repository utilization warning threshold percentage.
:return: The full_warn_threshold of this PITView.
:rtype: int
:required/optional: required
"""
return self._full_warn_threshold
@full_warn_threshold.setter
def full_warn_threshold(self, full_warn_threshold):
"""
Sets the full_warn_threshold of this PITView.
The repository utilization warning threshold percentage.
:param full_warn_threshold: The full_warn_threshold of this PITView.
:type: int
"""
self._full_warn_threshold = full_warn_threshold
@property
def view_time(self):
"""
Gets the view_time of this PITView.
The controller-time (measured in seconds since January 1, 1970) when view was created or re-attached to another PiT.
:return: The view_time of this PITView.
:rtype: int
:required/optional: required
"""
return self._view_time
@view_time.setter
def view_time(self, view_time):
"""
Sets the view_time of this PITView.
The controller-time (measured in seconds since January 1, 1970) when view was created or re-attached to another PiT.
:param view_time: The view_time of this PITView.
:type: int
"""
self._view_time = view_time
@property
def view_sequence_number(self):
"""
Gets the view_sequence_number of this PITView.
Sequence number. This is a monotonically increasing sequence value that can be used to determine related views when the view was created as part of a consistency group operation.
:return: The view_sequence_number of this PITView.
:rtype: int
:required/optional: required
"""
return self._view_sequence_number
@view_sequence_number.setter
def view_sequence_number(self, view_sequence_number):
"""
Sets the view_sequence_number of this PITView.
Sequence number. This is a monotonically increasing sequence value that can be used to determine related views when the view was created as part of a consistency group operation.
:param view_sequence_number: The view_sequence_number of this PITView.
:type: int
"""
self._view_sequence_number = view_sequence_number
@property
def perms(self):
"""
Gets the perms of this PITView.
The permissions for the view.
:return: The perms of this PITView.
:rtype: VolumePerms
:required/optional: required
"""
return self._perms
@perms.setter
def perms(self, perms):
"""
Sets the perms of this PITView.
The permissions for the view.
:param perms: The perms of this PITView.
:type: VolumePerms
"""
self._perms = perms
@property
def volume_handle(self):
"""
Gets the volume_handle of this PITView.
The volume ssid. This is provided primarily for debug purposes.
:return: The volume_handle of this PITView.
:rtype: int
:required/optional: required
"""
return self._volume_handle
@volume_handle.setter
def volume_handle(self, volume_handle):
"""
Sets the volume_handle of this PITView.
The volume ssid. This is provided primarily for debug purposes.
:param volume_handle: The volume_handle of this PITView.
:type: int
"""
self._volume_handle = volume_handle
@property
def cluster_size(self):
"""
Gets the cluster_size of this PITView.
The cluster size in bytes.
:return: The cluster_size of this PITView.
:rtype: int
:required/optional: required
"""
return self._cluster_size
@cluster_size.setter
def cluster_size(self, cluster_size):
"""
Sets the cluster_size of this PITView.
The cluster size in bytes.
:param cluster_size: The cluster_size of this PITView.
:type: int
"""
self._cluster_size = cluster_size
@property
def max_repository_capacity(self):
"""
Gets the max_repository_capacity of this PITView.
The maximum allowable repository size in bytes based on current cluster size.
:return: The max_repository_capacity of this PITView.
:rtype: int
:required/optional: required
"""
return self._max_repository_capacity
@max_repository_capacity.setter
def max_repository_capacity(self, max_repository_capacity):
"""
Sets the max_repository_capacity of this PITView.
The maximum allowable repository size in bytes based on current cluster size.
:param max_repository_capacity: The max_repository_capacity of this PITView.
:type: int
"""
self._max_repository_capacity = max_repository_capacity
@property
def unusable_repository_capacity(self):
"""
Gets the unusable_repository_capacity of this PITView.
The amount of repository capacity in bytes that is unusable due to limited addressability of the current cluster size.
:return: The unusable_repository_capacity of this PITView.
:rtype: int
:required/optional: required
"""
return self._unusable_repository_capacity
@unusable_repository_capacity.setter
def unusable_repository_capacity(self, unusable_repository_capacity):
"""
Sets the unusable_repository_capacity of this PITView.
The amount of repository capacity in bytes that is unusable due to limited addressability of the current cluster size.
:param unusable_repository_capacity: The unusable_repository_capacity of this PITView.
:type: int
"""
self._unusable_repository_capacity = unusable_repository_capacity
@property
def membership(self):
"""
Gets the membership of this PITView.
This view's relationship (if any) to a Consistency Group View.
:return: The membership of this PITView.
:rtype: PITViewMembership
:required/optional: required
"""
return self._membership
@membership.setter
def membership(self, membership):
"""
Sets the membership of this PITView.
This view's relationship (if any) to a Consistency Group View.
:param membership: The membership of this PITView.
:type: PITViewMembership
"""
self._membership = membership
@property
def mgmt_client_attribute(self):
"""
Gets the mgmt_client_attribute of this PITView.
The management client attribute.
:return: The mgmt_client_attribute of this PITView.
:rtype: int
:required/optional: required
"""
return self._mgmt_client_attribute
@mgmt_client_attribute.setter
def mgmt_client_attribute(self, mgmt_client_attribute):
"""
Sets the mgmt_client_attribute of this PITView.
The management client attribute.
:param mgmt_client_attribute: The mgmt_client_attribute of this PITView.
:type: int
"""
self._mgmt_client_attribute = mgmt_client_attribute
@property
def offline(self):
"""
Gets the offline of this PITView.
The view is offline due to the associated repository volume state.
:return: The offline of this PITView.
:rtype: bool
:required/optional: required
"""
return self._offline
@offline.setter
def offline(self, offline):
"""
Sets the offline of this PITView.
The view is offline due to the associated repository volume state.
:param offline: The offline of this PITView.
:type: bool
"""
self._offline = offline
@property
def name(self):
"""
Gets the name of this PITView.
:return: The name of this PITView.
:rtype: str
:required/optional: optional
"""
return self._name
@name.setter
def name(self, name):
"""
Sets the name of this PITView.
:param name: The name of this PITView.
:type: str
"""
self._name = name
@property
def id(self):
"""
Gets the id of this PITView.
:return: The id of this PITView.
:rtype: str
:required/optional: optional
"""
return self._id
@id.setter
def id(self, id):
"""
Sets the id of this PITView.
:param id: The id of this PITView.
: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