text: # coding: utf-8
  
  """
  Copyright 2016 SmartBear Software
  
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
  
          http://www.apache.org/licenses/LICENSE-2.0
  
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
  
      Ref: https://github.com/swagger-api/swagger-codegen
  """
  
  from pprint import pformat
  from six import iteritems
  import re
  
  
  class UpgradeCluster(object):
      """
      NOTE: This class is auto generated by the swagger code generator program.
      Do not edit the class manually.
      """
      def __init__(self):
          """
          UpgradeCluster - 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 = {
              'cluster_overview': 'UpgradeClusterClusterOverview',
              'cluster_state': 'str',
              'finish_time': 'str',
              'install_image_path': 'str',
              'onefs_version_current': 'ClusterNodesOnefsVersion',
              'onefs_version_upgrade': 'ClusterNodesOnefsVersion',
              'patch_action': 'str',
              'patch_name': 'str',
              'start_time': 'str',
              'upgrade_settings': 'UpgradeClusterUpgradeSettings'
          }
  
          self.attribute_map = {
              'cluster_overview': 'cluster_overview',
              'cluster_state': 'cluster_state',
              'finish_time': 'finish_time',
              'install_image_path': 'install_image_path',
              'onefs_version_current': 'onefs_version_current',
              'onefs_version_upgrade': 'onefs_version_upgrade',
              'patch_action': 'patch_action',
              'patch_name': 'patch_name',
              'start_time': 'start_time',
              'upgrade_settings': 'upgrade_settings'
          }
  
          self._cluster_overview = None
          self._cluster_state = None
          self._finish_time = None
          self._install_image_path = None
          self._onefs_version_current = None
          self._onefs_version_upgrade = None
          self._patch_action = None
          self._patch_name = None
          self._start_time = None
          self._upgrade_settings = None
  
      @property
      def cluster_overview(self):
          """
          Gets the cluster_overview of this UpgradeCluster.
          The cluster overview of an upgrade process.
  
          :return: The cluster_overview of this UpgradeCluster.
          :rtype: UpgradeClusterClusterOverview
          """
          return self._cluster_overview
  
      @cluster_overview.setter
      def cluster_overview(self, cluster_overview):
          """
          Sets the cluster_overview of this UpgradeCluster.
          The cluster overview of an upgrade process.
  
          :param cluster_overview: The cluster_overview of this UpgradeCluster.
          :type: UpgradeClusterClusterOverview
          """
          
          self._cluster_overview = cluster_overview
  
      @property
      def cluster_state(self):
          """
          Gets the cluster_state of this UpgradeCluster.
          The different states of an upgrade, rollback, or assessment. One of the following values: 'committed', 'upgraded', 'partially upgraded', 'upgrading', 'rolling back', 'assessing', 'error'
  
          :return: The cluster_state of this UpgradeCluster.
          :rtype: str
          """
          return self._cluster_state
  
      @cluster_state.setter
      def cluster_state(self, cluster_state):
          """
          Sets the cluster_state of this UpgradeCluster.
          The different states of an upgrade, rollback, or assessment. One of the following values: 'committed', 'upgraded', 'partially upgraded', 'upgrading', 'rolling back', 'assessing', 'error'
  
          :param cluster_state: The cluster_state of this UpgradeCluster.
          :type: str
          """
          
          self._cluster_state = cluster_state
  
      @property
      def finish_time(self):
          """
          Gets the finish_time of this UpgradeCluster.
          The time when a rollback, assessment or upgrade has finished completely. Use ISO 8601 standard. Null if the cluster_state is not 'upgraded'.
  
          :return: The finish_time of this UpgradeCluster.
          :rtype: str
          """
          return self._finish_time
  
      @finish_time.setter
      def finish_time(self, finish_time):
          """
          Sets the finish_time of this UpgradeCluster.
          The time when a rollback, assessment or upgrade has finished completely. Use ISO 8601 standard. Null if the cluster_state is not 'upgraded'.
  
          :param finish_time: The finish_time of this UpgradeCluster.
          :type: str
          """
          
          self._finish_time = finish_time
  
      @property
      def install_image_path(self):
          """
          Gets the install_image_path of this UpgradeCluster.
          The location (path) of the upgrade image which must be within /ifs. Null if the cluster_state is 'committed' or 'upgraded.'
  
          :return: The install_image_path of this UpgradeCluster.
          :rtype: str
          """
          return self._install_image_path
  
      @install_image_path.setter
      def install_image_path(self, install_image_path):
          """
          Sets the install_image_path of this UpgradeCluster.
          The location (path) of the upgrade image which must be within /ifs. Null if the cluster_state is 'committed' or 'upgraded.'
  
          :param install_image_path: The install_image_path of this UpgradeCluster.
          :type: str
          """
          
          self._install_image_path = install_image_path
  
      @property
      def onefs_version_current(self):
          """
          Gets the onefs_version_current of this UpgradeCluster.
          The current OneFS version before upgrade.
  
          :return: The onefs_version_current of this UpgradeCluster.
          :rtype: ClusterNodesOnefsVersion
          """
          return self._onefs_version_current
  
      @onefs_version_current.setter
      def onefs_version_current(self, onefs_version_current):
          """
          Sets the onefs_version_current of this UpgradeCluster.
          The current OneFS version before upgrade.
  
          :param onefs_version_current: The onefs_version_current of this UpgradeCluster.
          :type: ClusterNodesOnefsVersion
          """
          
          self._onefs_version_current = onefs_version_current
  
      @property
      def onefs_version_upgrade(self):
          """
          Gets the onefs_version_upgrade of this UpgradeCluster.
          The OneFS version the user is attempting to upgrade to. Null if the cluster_state is 'committed' or 'assessing.'
  
          :return: The onefs_version_upgrade of this UpgradeCluster.
          :rtype: ClusterNodesOnefsVersion
          """
          return self._onefs_version_upgrade
  
      @onefs_version_upgrade.setter
      def onefs_version_upgrade(self, onefs_version_upgrade):
          """
          Sets the onefs_version_upgrade of this UpgradeCluster.
          The OneFS version the user is attempting to upgrade to. Null if the cluster_state is 'committed' or 'assessing.'
  
          :param onefs_version_upgrade: The onefs_version_upgrade of this UpgradeCluster.
          :type: ClusterNodesOnefsVersion
          """
          
          self._onefs_version_upgrade = onefs_version_upgrade
  
      @property
      def patch_action(self):
          """
          Gets the patch_action of this UpgradeCluster.
          The most recent patch action performed.
  
          :return: The patch_action of this UpgradeCluster.
          :rtype: str
          """
          return self._patch_action
  
      @patch_action.setter
      def patch_action(self, patch_action):
          """
          Sets the patch_action of this UpgradeCluster.
          The most recent patch action performed.
  
          :param patch_action: The patch_action of this UpgradeCluster.
          :type: str
          """
          
          self._patch_action = patch_action
  
      @property
      def patch_name(self):
          """
          Gets the patch_name of this UpgradeCluster.
          The patch with the most recent patch action.
  
          :return: The patch_name of this UpgradeCluster.
          :rtype: str
          """
          return self._patch_name
  
      @patch_name.setter
      def patch_name(self, patch_name):
          """
          Sets the patch_name of this UpgradeCluster.
          The patch with the most recent patch action.
  
          :param patch_name: The patch_name of this UpgradeCluster.
          :type: str
          """
          
          self._patch_name = patch_name
  
      @property
      def start_time(self):
          """
          Gets the start_time of this UpgradeCluster.
          The time when an upgrade, rollback, or assessment was started. Use ISO 8601 standard. Null if the cluster_state is 'committed' or 'partially upgraded.'
  
          :return: The start_time of this UpgradeCluster.
          :rtype: str
          """
          return self._start_time
  
      @start_time.setter
      def start_time(self, start_time):
          """
          Sets the start_time of this UpgradeCluster.
          The time when an upgrade, rollback, or assessment was started. Use ISO 8601 standard. Null if the cluster_state is 'committed' or 'partially upgraded.'
  
          :param start_time: The start_time of this UpgradeCluster.
          :type: str
          """
          
          self._start_time = start_time
  
      @property
      def upgrade_settings(self):
          """
          Gets the upgrade_settings of this UpgradeCluster.
          The settings neccessary when starting an upgrade. Null if the cluster_state is not 'upgrading' or 'partially upgraded.' or 'error'.
  
          :return: The upgrade_settings of this UpgradeCluster.
          :rtype: UpgradeClusterUpgradeSettings
          """
          return self._upgrade_settings
  
      @upgrade_settings.setter
      def upgrade_settings(self, upgrade_settings):
          """
          Sets the upgrade_settings of this UpgradeCluster.
          The settings neccessary when starting an upgrade. Null if the cluster_state is not 'upgrading' or 'partially upgraded.' or 'error'.
  
          :param upgrade_settings: The upgrade_settings of this UpgradeCluster.
          :type: UpgradeClusterUpgradeSettings
          """
          
          self._upgrade_settings = upgrade_settings
  
      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
  
      def to_str(self):
          """
          Returns the string representation of the model
          """
          return pformat(self.to_dict())
  
      def __repr__(self):
          """
          For `print` and `pprint`
          """
          return self.to_str()
  
      def __eq__(self, other):
          """
          Returns true if both objects are equal
          """
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """
          Returns true if both objects are not equal
          """
          return not self == other
  
  