# coding: utf-8
"""
IscsiTargetStatistics.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 IscsiTargetStatistics(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
IscsiTargetStatistics - 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 = {
'target': 'str', # (required parameter)
'successful_logins': 'int', # (required parameter)
'login_failures': 'int', # (required parameter)
'successful_login_authentications': 'int', # (required parameter)
'authentication_login_failures': 'int', # (required parameter)
'error_free_pdus': 'int', # (required parameter)
'protocol_error_pdus': 'int', # (required parameter)
'header_digest_errors': 'int', # (required parameter)
'data_digest_errors': 'int', # (required parameter)
'session_failures': 'int', # (required parameter)
'connection_failures': 'int'
}
self.attribute_map = {
'target': 'target', # (required parameter)
'successful_logins': 'successfulLogins', # (required parameter)
'login_failures': 'loginFailures', # (required parameter)
'successful_login_authentications': 'successfulLoginAuthentications', # (required parameter)
'authentication_login_failures': 'authenticationLoginFailures', # (required parameter)
'error_free_pdus': 'errorFreePdus', # (required parameter)
'protocol_error_pdus': 'protocolErrorPdus', # (required parameter)
'header_digest_errors': 'headerDigestErrors', # (required parameter)
'data_digest_errors': 'dataDigestErrors', # (required parameter)
'session_failures': 'sessionFailures', # (required parameter)
'connection_failures': 'connectionFailures'
}
self._target = None
self._successful_logins = None
self._login_failures = None
self._successful_login_authentications = None
self._authentication_login_failures = None
self._error_free_pdus = None
self._protocol_error_pdus = None
self._header_digest_errors = None
self._data_digest_errors = None
self._session_failures = None
self._connection_failures = None
@property
def target(self):
"""
Gets the target of this IscsiTargetStatistics.
A reference to the target with which the statistics are associated.
:return: The target of this IscsiTargetStatistics.
:rtype: str
:required/optional: required
"""
return self._target
@target.setter
def target(self, target):
"""
Sets the target of this IscsiTargetStatistics.
A reference to the target with which the statistics are associated.
:param target: The target of this IscsiTargetStatistics.
:type: str
"""
self._target = target
@property
def successful_logins(self):
"""
Gets the successful_logins of this IscsiTargetStatistics.
The count of successful iSCSI logins to the target.
:return: The successful_logins of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._successful_logins
@successful_logins.setter
def successful_logins(self, successful_logins):
"""
Sets the successful_logins of this IscsiTargetStatistics.
The count of successful iSCSI logins to the target.
:param successful_logins: The successful_logins of this IscsiTargetStatistics.
:type: int
"""
self._successful_logins = successful_logins
@property
def login_failures(self):
"""
Gets the login_failures of this IscsiTargetStatistics.
The number of times an iSCSI login attempt to or from the target failed.
:return: The login_failures of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._login_failures
@login_failures.setter
def login_failures(self, login_failures):
"""
Sets the login_failures of this IscsiTargetStatistics.
The number of times an iSCSI login attempt to or from the target failed.
:param login_failures: The login_failures of this IscsiTargetStatistics.
:type: int
"""
self._login_failures = login_failures
@property
def successful_login_authentications(self):
"""
Gets the successful_login_authentications of this IscsiTargetStatistics.
The number of times an initiator login authentication attempt was accepted by the target.
:return: The successful_login_authentications of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._successful_login_authentications
@successful_login_authentications.setter
def successful_login_authentications(self, successful_login_authentications):
"""
Sets the successful_login_authentications of this IscsiTargetStatistics.
The number of times an initiator login authentication attempt was accepted by the target.
:param successful_login_authentications: The successful_login_authentications of this IscsiTargetStatistics.
:type: int
"""
self._successful_login_authentications = successful_login_authentications
@property
def authentication_login_failures(self):
"""
Gets the authentication_login_failures of this IscsiTargetStatistics.
The number of times an initiator login authentication attempt was rejected by the target.
:return: The authentication_login_failures of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._authentication_login_failures
@authentication_login_failures.setter
def authentication_login_failures(self, authentication_login_failures):
"""
Sets the authentication_login_failures of this IscsiTargetStatistics.
The number of times an initiator login authentication attempt was rejected by the target.
:param authentication_login_failures: The authentication_login_failures of this IscsiTargetStatistics.
:type: int
"""
self._authentication_login_failures = authentication_login_failures
@property
def error_free_pdus(self):
"""
Gets the error_free_pdus of this IscsiTargetStatistics.
The number of iSCSI PDUs processed by the target that experienced no errors of any sort.
:return: The error_free_pdus of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._error_free_pdus
@error_free_pdus.setter
def error_free_pdus(self, error_free_pdus):
"""
Sets the error_free_pdus of this IscsiTargetStatistics.
The number of iSCSI PDUs processed by the target that experienced no errors of any sort.
:param error_free_pdus: The error_free_pdus of this IscsiTargetStatistics.
:type: int
"""
self._error_free_pdus = error_free_pdus
@property
def protocol_error_pdus(self):
"""
Gets the protocol_error_pdus of this IscsiTargetStatistics.
The number of iSCSI PDUs processed by the target that experienced protocol errors.
:return: The protocol_error_pdus of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._protocol_error_pdus
@protocol_error_pdus.setter
def protocol_error_pdus(self, protocol_error_pdus):
"""
Sets the protocol_error_pdus of this IscsiTargetStatistics.
The number of iSCSI PDUs processed by the target that experienced protocol errors.
:param protocol_error_pdus: The protocol_error_pdus of this IscsiTargetStatistics.
:type: int
"""
self._protocol_error_pdus = protocol_error_pdus
@property
def header_digest_errors(self):
"""
Gets the header_digest_errors of this IscsiTargetStatistics.
The number of iSCSI PDUs received by the target having header digest errors.
:return: The header_digest_errors of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._header_digest_errors
@header_digest_errors.setter
def header_digest_errors(self, header_digest_errors):
"""
Sets the header_digest_errors of this IscsiTargetStatistics.
The number of iSCSI PDUs received by the target having header digest errors.
:param header_digest_errors: The header_digest_errors of this IscsiTargetStatistics.
:type: int
"""
self._header_digest_errors = header_digest_errors
@property
def data_digest_errors(self):
"""
Gets the data_digest_errors of this IscsiTargetStatistics.
The number of iSCSI PDUs received by the target having data digest errors.
:return: The data_digest_errors of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._data_digest_errors
@data_digest_errors.setter
def data_digest_errors(self, data_digest_errors):
"""
Sets the data_digest_errors of this IscsiTargetStatistics.
The number of iSCSI PDUs received by the target having data digest errors.
:param data_digest_errors: The data_digest_errors of this IscsiTargetStatistics.
:type: int
"""
self._data_digest_errors = data_digest_errors
@property
def session_failures(self):
"""
Gets the session_failures of this IscsiTargetStatistics.
The number of iSCSI sessions for the target that terminated abnormally, either by administrative action or due to firmware-detected error.
:return: The session_failures of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._session_failures
@session_failures.setter
def session_failures(self, session_failures):
"""
Sets the session_failures of this IscsiTargetStatistics.
The number of iSCSI sessions for the target that terminated abnormally, either by administrative action or due to firmware-detected error.
:param session_failures: The session_failures of this IscsiTargetStatistics.
:type: int
"""
self._session_failures = session_failures
@property
def connection_failures(self):
"""
Gets the connection_failures of this IscsiTargetStatistics.
The number of iSCSI connections for the target that terminated abnormally, either by administrative action or due to firmware-detected error.
:return: The connection_failures of this IscsiTargetStatistics.
:rtype: int
:required/optional: required
"""
return self._connection_failures
@connection_failures.setter
def connection_failures(self, connection_failures):
"""
Sets the connection_failures of this IscsiTargetStatistics.
The number of iSCSI connections for the target that terminated abnormally, either by administrative action or due to firmware-detected error.
:param connection_failures: The connection_failures of this IscsiTargetStatistics.
:type: int
"""
self._connection_failures = connection_failures
[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