# coding: utf-8
"""
IscsiNegotiableSessionSettings.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 IscsiNegotiableSessionSettings(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
IscsiNegotiableSessionSettings - 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 = {
'initial_r2t': 'bool', # (required parameter)
'immediate_data': 'bool', # (required parameter)
'max_outstanding_r2t': 'int', # (required parameter)
'max_unsolicited_first_data_burst_length': 'int', # (required parameter)
'max_data_burst_length': 'int', # (required parameter)
'data_sequence_in_order': 'bool', # (required parameter)
'data_pdu_in_order': 'bool', # (required parameter)
'error_recovery_level': 'int', # (required parameter)
'max_connections_per_session': 'int', # (required parameter)
'default_time_to_wait': 'int', # (required parameter)
'default_time_to_retain': 'int'
}
self.attribute_map = {
'initial_r2t': 'initialR2t', # (required parameter)
'immediate_data': 'immediateData', # (required parameter)
'max_outstanding_r2t': 'maxOutstandingR2t', # (required parameter)
'max_unsolicited_first_data_burst_length': 'maxUnsolicitedFirstDataBurstLength', # (required parameter)
'max_data_burst_length': 'maxDataBurstLength', # (required parameter)
'data_sequence_in_order': 'dataSequenceInOrder', # (required parameter)
'data_pdu_in_order': 'dataPduInOrder', # (required parameter)
'error_recovery_level': 'errorRecoveryLevel', # (required parameter)
'max_connections_per_session': 'maxConnectionsPerSession', # (required parameter)
'default_time_to_wait': 'defaultTimeToWait', # (required parameter)
'default_time_to_retain': 'defaultTimeToRetain'
}
self._initial_r2t = None
self._immediate_data = None
self._max_outstanding_r2t = None
self._max_unsolicited_first_data_burst_length = None
self._max_data_burst_length = None
self._data_sequence_in_order = None
self._data_pdu_in_order = None
self._error_recovery_level = None
self._max_connections_per_session = None
self._default_time_to_wait = None
self._default_time_to_retain = None
@property
def initial_r2t(self):
"""
Gets the initial_r2t of this IscsiNegotiableSessionSettings.
True indicates that the initiator must wait for an R2T before sending to the target. False indicates the initiator may send data immediately.
:return: The initial_r2t of this IscsiNegotiableSessionSettings.
:rtype: bool
:required/optional: required
"""
return self._initial_r2t
@initial_r2t.setter
def initial_r2t(self, initial_r2t):
"""
Sets the initial_r2t of this IscsiNegotiableSessionSettings.
True indicates that the initiator must wait for an R2T before sending to the target. False indicates the initiator may send data immediately.
:param initial_r2t: The initial_r2t of this IscsiNegotiableSessionSettings.
:type: bool
"""
self._initial_r2t = initial_r2t
@property
def immediate_data(self):
"""
Gets the immediate_data of this IscsiNegotiableSessionSettings.
True indicates that the initiator and target have agreed to support immediate data on this session.
:return: The immediate_data of this IscsiNegotiableSessionSettings.
:rtype: bool
:required/optional: required
"""
return self._immediate_data
@immediate_data.setter
def immediate_data(self, immediate_data):
"""
Sets the immediate_data of this IscsiNegotiableSessionSettings.
True indicates that the initiator and target have agreed to support immediate data on this session.
:param immediate_data: The immediate_data of this IscsiNegotiableSessionSettings.
:type: bool
"""
self._immediate_data = immediate_data
@property
def max_outstanding_r2t(self):
"""
Gets the max_outstanding_r2t of this IscsiNegotiableSessionSettings.
The maximum number of outstanding request-to-transmit (R2T)s per iSCSI task within this session.
:return: The max_outstanding_r2t of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._max_outstanding_r2t
@max_outstanding_r2t.setter
def max_outstanding_r2t(self, max_outstanding_r2t):
"""
Sets the max_outstanding_r2t of this IscsiNegotiableSessionSettings.
The maximum number of outstanding request-to-transmit (R2T)s per iSCSI task within this session.
:param max_outstanding_r2t: The max_outstanding_r2t of this IscsiNegotiableSessionSettings.
:type: int
"""
self._max_outstanding_r2t = max_outstanding_r2t
@property
def max_unsolicited_first_data_burst_length(self):
"""
Gets the max_unsolicited_first_data_burst_length of this IscsiNegotiableSessionSettings.
The maximum length supported for unsolicited data sent within this session.
:return: The max_unsolicited_first_data_burst_length of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._max_unsolicited_first_data_burst_length
@max_unsolicited_first_data_burst_length.setter
def max_unsolicited_first_data_burst_length(self, max_unsolicited_first_data_burst_length):
"""
Sets the max_unsolicited_first_data_burst_length of this IscsiNegotiableSessionSettings.
The maximum length supported for unsolicited data sent within this session.
:param max_unsolicited_first_data_burst_length: The max_unsolicited_first_data_burst_length of this IscsiNegotiableSessionSettings.
:type: int
"""
self._max_unsolicited_first_data_burst_length = max_unsolicited_first_data_burst_length
@property
def max_data_burst_length(self):
"""
Gets the max_data_burst_length of this IscsiNegotiableSessionSettings.
The maximum number of bytes which can be sent within a single sequence of Data-In or Data-Out PDUs.
:return: The max_data_burst_length of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._max_data_burst_length
@max_data_burst_length.setter
def max_data_burst_length(self, max_data_burst_length):
"""
Sets the max_data_burst_length of this IscsiNegotiableSessionSettings.
The maximum number of bytes which can be sent within a single sequence of Data-In or Data-Out PDUs.
:param max_data_burst_length: The max_data_burst_length of this IscsiNegotiableSessionSettings.
:type: int
"""
self._max_data_burst_length = max_data_burst_length
@property
def data_sequence_in_order(self):
"""
Gets the data_sequence_in_order of this IscsiNegotiableSessionSettings.
True indicates that data PDU sequences must be transferred using continuously increasing offsets, except during error recovery False indicates that iSCSI data PDU sequences may be transferred in any order.
:return: The data_sequence_in_order of this IscsiNegotiableSessionSettings.
:rtype: bool
:required/optional: required
"""
return self._data_sequence_in_order
@data_sequence_in_order.setter
def data_sequence_in_order(self, data_sequence_in_order):
"""
Sets the data_sequence_in_order of this IscsiNegotiableSessionSettings.
True indicates that data PDU sequences must be transferred using continuously increasing offsets, except during error recovery False indicates that iSCSI data PDU sequences may be transferred in any order.
:param data_sequence_in_order: The data_sequence_in_order of this IscsiNegotiableSessionSettings.
:type: bool
"""
self._data_sequence_in_order = data_sequence_in_order
@property
def data_pdu_in_order(self):
"""
Gets the data_pdu_in_order of this IscsiNegotiableSessionSettings.
True indicates that data PDUs within sequences must be at continuously increasing addresses, with no gaps or overlay between PDUs. False indicates that iSCSI data PDUs within sequences may be in any order.
:return: The data_pdu_in_order of this IscsiNegotiableSessionSettings.
:rtype: bool
:required/optional: required
"""
return self._data_pdu_in_order
@data_pdu_in_order.setter
def data_pdu_in_order(self, data_pdu_in_order):
"""
Sets the data_pdu_in_order of this IscsiNegotiableSessionSettings.
True indicates that data PDUs within sequences must be at continuously increasing addresses, with no gaps or overlay between PDUs. False indicates that iSCSI data PDUs within sequences may be in any order.
:param data_pdu_in_order: The data_pdu_in_order of this IscsiNegotiableSessionSettings.
:type: bool
"""
self._data_pdu_in_order = data_pdu_in_order
@property
def error_recovery_level(self):
"""
Gets the error_recovery_level of this IscsiNegotiableSessionSettings.
The level of error recovery negotiated between the initiator and the target.
:return: The error_recovery_level of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._error_recovery_level
@error_recovery_level.setter
def error_recovery_level(self, error_recovery_level):
"""
Sets the error_recovery_level of this IscsiNegotiableSessionSettings.
The level of error recovery negotiated between the initiator and the target.
:param error_recovery_level: The error_recovery_level of this IscsiNegotiableSessionSettings.
:type: int
"""
self._error_recovery_level = error_recovery_level
@property
def max_connections_per_session(self):
"""
Gets the max_connections_per_session of this IscsiNegotiableSessionSettings.
The maximum number of connections allowed in this session.
:return: The max_connections_per_session of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._max_connections_per_session
@max_connections_per_session.setter
def max_connections_per_session(self, max_connections_per_session):
"""
Sets the max_connections_per_session of this IscsiNegotiableSessionSettings.
The maximum number of connections allowed in this session.
:param max_connections_per_session: The max_connections_per_session of this IscsiNegotiableSessionSettings.
:type: int
"""
self._max_connections_per_session = max_connections_per_session
@property
def default_time_to_wait(self):
"""
Gets the default_time_to_wait of this IscsiNegotiableSessionSettings.
The minimum time, in seconds, to wait before attempting an explicit/implicit logout or active iSCSI task reassignment after an unexpected connection termination or a connection reset.
:return: The default_time_to_wait of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._default_time_to_wait
@default_time_to_wait.setter
def default_time_to_wait(self, default_time_to_wait):
"""
Sets the default_time_to_wait of this IscsiNegotiableSessionSettings.
The minimum time, in seconds, to wait before attempting an explicit/implicit logout or active iSCSI task reassignment after an unexpected connection termination or a connection reset.
:param default_time_to_wait: The default_time_to_wait of this IscsiNegotiableSessionSettings.
:type: int
"""
self._default_time_to_wait = default_time_to_wait
@property
def default_time_to_retain(self):
"""
Gets the default_time_to_retain of this IscsiNegotiableSessionSettings.
The maximum time, in seconds after an initial wait, before which an active iSCSI task reassignment is still possible after an unexpected connection.
:return: The default_time_to_retain of this IscsiNegotiableSessionSettings.
:rtype: int
:required/optional: required
"""
return self._default_time_to_retain
@default_time_to_retain.setter
def default_time_to_retain(self, default_time_to_retain):
"""
Sets the default_time_to_retain of this IscsiNegotiableSessionSettings.
The maximum time, in seconds after an initial wait, before which an active iSCSI task reassignment is still possible after an unexpected connection.
:param default_time_to_retain: The default_time_to_retain of this IscsiNegotiableSessionSettings.
:type: int
"""
self._default_time_to_retain = default_time_to_retain
[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