Source code for netapp.santricity.models.v2.cfw_upgrade_response

# coding: utf-8

"""
CfwUpgradeResponse.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 CfwUpgradeResponse(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ CfwUpgradeResponse - 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 = { 'request_id': 'int', # (required parameter) 'health_check': 'FirmwareUpgradeHealthCheckResult', # (required parameter) 'start_time': 'datetime', # (required parameter) 'upload_start_time': 'datetime', # (required parameter) 'activation_start_time': 'datetime', # (required parameter) 'upload_completion_time': 'datetime', # (required parameter) 'upload_completion_percentage': 'int', # (required parameter) 'activation_completion_time': 'datetime', # (required parameter) 'running': 'bool' } self.attribute_map = { 'request_id': 'requestId', # (required parameter) 'health_check': 'healthCheck', # (required parameter) 'start_time': 'startTime', # (required parameter) 'upload_start_time': 'uploadStartTime', # (required parameter) 'activation_start_time': 'activationStartTime', # (required parameter) 'upload_completion_time': 'uploadCompletionTime', # (required parameter) 'upload_completion_percentage': 'uploadCompletionPercentage', # (required parameter) 'activation_completion_time': 'activationCompletionTime', # (required parameter) 'running': 'running' } self._request_id = None self._health_check = None self._start_time = None self._upload_start_time = None self._activation_start_time = None self._upload_completion_time = None self._upload_completion_percentage = None self._activation_completion_time = None self._running = None @property def request_id(self): """ Gets the request_id of this CfwUpgradeResponse. A unique value that identifies the request for later retrieval. :return: The request_id of this CfwUpgradeResponse. :rtype: int :required/optional: required """ return self._request_id @request_id.setter def request_id(self, request_id): """ Sets the request_id of this CfwUpgradeResponse. A unique value that identifies the request for later retrieval. :param request_id: The request_id of this CfwUpgradeResponse. :type: int """ self._request_id = request_id @property def health_check(self): """ Gets the health_check of this CfwUpgradeResponse. :return: The health_check of this CfwUpgradeResponse. :rtype: FirmwareUpgradeHealthCheckResult :required/optional: required """ return self._health_check @health_check.setter def health_check(self, health_check): """ Sets the health_check of this CfwUpgradeResponse. :param health_check: The health_check of this CfwUpgradeResponse. :type: FirmwareUpgradeHealthCheckResult """ self._health_check = health_check @property def start_time(self): """ Gets the start_time of this CfwUpgradeResponse. :return: The start_time of this CfwUpgradeResponse. :rtype: datetime :required/optional: required """ return self._start_time @start_time.setter def start_time(self, start_time): """ Sets the start_time of this CfwUpgradeResponse. :param start_time: The start_time of this CfwUpgradeResponse. :type: datetime """ self._start_time = start_time @property def upload_start_time(self): """ Gets the upload_start_time of this CfwUpgradeResponse. :return: The upload_start_time of this CfwUpgradeResponse. :rtype: datetime :required/optional: required """ return self._upload_start_time @upload_start_time.setter def upload_start_time(self, upload_start_time): """ Sets the upload_start_time of this CfwUpgradeResponse. :param upload_start_time: The upload_start_time of this CfwUpgradeResponse. :type: datetime """ self._upload_start_time = upload_start_time @property def activation_start_time(self): """ Gets the activation_start_time of this CfwUpgradeResponse. :return: The activation_start_time of this CfwUpgradeResponse. :rtype: datetime :required/optional: required """ return self._activation_start_time @activation_start_time.setter def activation_start_time(self, activation_start_time): """ Sets the activation_start_time of this CfwUpgradeResponse. :param activation_start_time: The activation_start_time of this CfwUpgradeResponse. :type: datetime """ self._activation_start_time = activation_start_time @property def upload_completion_time(self): """ Gets the upload_completion_time of this CfwUpgradeResponse. :return: The upload_completion_time of this CfwUpgradeResponse. :rtype: datetime :required/optional: required """ return self._upload_completion_time @upload_completion_time.setter def upload_completion_time(self, upload_completion_time): """ Sets the upload_completion_time of this CfwUpgradeResponse. :param upload_completion_time: The upload_completion_time of this CfwUpgradeResponse. :type: datetime """ self._upload_completion_time = upload_completion_time @property def upload_completion_percentage(self): """ Gets the upload_completion_percentage of this CfwUpgradeResponse. :return: The upload_completion_percentage of this CfwUpgradeResponse. :rtype: int :required/optional: required """ return self._upload_completion_percentage @upload_completion_percentage.setter def upload_completion_percentage(self, upload_completion_percentage): """ Sets the upload_completion_percentage of this CfwUpgradeResponse. :param upload_completion_percentage: The upload_completion_percentage of this CfwUpgradeResponse. :type: int """ self._upload_completion_percentage = upload_completion_percentage @property def activation_completion_time(self): """ Gets the activation_completion_time of this CfwUpgradeResponse. :return: The activation_completion_time of this CfwUpgradeResponse. :rtype: datetime :required/optional: required """ return self._activation_completion_time @activation_completion_time.setter def activation_completion_time(self, activation_completion_time): """ Sets the activation_completion_time of this CfwUpgradeResponse. :param activation_completion_time: The activation_completion_time of this CfwUpgradeResponse. :type: datetime """ self._activation_completion_time = activation_completion_time @property def running(self): """ Gets the running of this CfwUpgradeResponse. :return: The running of this CfwUpgradeResponse. :rtype: bool :required/optional: required """ return self._running @running.setter def running(self, running): """ Sets the running of this CfwUpgradeResponse. :param running: The running of this CfwUpgradeResponse. :type: bool """ self._running = running
[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