# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::ServiceFabric::V6_4_0_36
  module Models
    #
    # Represents a ServiceFabric cluster upgrade
    #
    class ClusterUpgradeDescriptionObject

      include MsRestAzure

      # @return [String] The cluster configuration version (specified in the
      # cluster manifest).
      attr_accessor :config_version

      # @return [String] The ServiceFabric code version of the cluster.
      attr_accessor :code_version

      # @return [UpgradeKind] The kind of upgrade out of the following possible
      # values. Possible values include: 'Invalid', 'Rolling'. Default value:
      # 'Rolling' .
      attr_accessor :upgrade_kind

      # @return [UpgradeMode] The mode used to monitor health during a rolling
      # upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and
      # Monitored. Possible values include: 'Invalid', 'UnmonitoredAuto',
      # 'UnmonitoredManual', 'Monitored'. Default value: 'UnmonitoredAuto' .
      attr_accessor :rolling_upgrade_mode

      # @return [Integer] The maximum amount of time to block processing of an
      # upgrade domain and prevent loss of availability when there are
      # unexpected issues. When this timeout expires, processing of the upgrade
      # domain will proceed regardless of availability loss issues. The timeout
      # is reset at the start of each upgrade domain. Valid values are between
      # 0 and 42949672925 inclusive. (unsigned 32-bit integer).
      attr_accessor :upgrade_replica_set_check_timeout_in_seconds

      # @return [Boolean] If true, then processes are forcefully restarted
      # during upgrade even when the code version has not changed (the upgrade
      # only changes configuration or data).
      attr_accessor :force_restart

      # @return [Boolean] When true, enables delta health evaluation rather
      # than absolute health evaluation after completion of each upgrade
      # domain.
      attr_accessor :enable_delta_health_evaluation

      # @return [MonitoringPolicyDescription] Describes the parameters for
      # monitoring an upgrade in Monitored mode.
      attr_accessor :monitoring_policy

      # @return [ClusterHealthPolicy] Defines a health policy used to evaluate
      # the health of the cluster or of a cluster node.
      attr_accessor :cluster_health_policy

      # @return [ClusterUpgradeHealthPolicyObject] Defines a health policy used
      # to evaluate the health of the cluster during a cluster upgrade.
      attr_accessor :cluster_upgrade_health_policy

      # @return [Array<ApplicationHealthPolicyMapItem>] Defines a map that
      # contains specific application health policies for different
      # applications.
      # Each entry specifies as key the application name and as value an
      # ApplicationHealthPolicy used to evaluate the application health.
      # If an application is not specified in the map, the application health
      # evaluation uses the ApplicationHealthPolicy found in its application
      # manifest or the default application health policy (if no health policy
      # is defined in the manifest).
      # The map is empty by default.
      attr_accessor :application_health_policy_map


      #
      # Mapper for ClusterUpgradeDescriptionObject class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ClusterUpgradeDescriptionObject',
          type: {
            name: 'Composite',
            class_name: 'ClusterUpgradeDescriptionObject',
            model_properties: {
              config_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ConfigVersion',
                type: {
                  name: 'String'
                }
              },
              code_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'CodeVersion',
                type: {
                  name: 'String'
                }
              },
              upgrade_kind: {
                client_side_validation: true,
                required: false,
                serialized_name: 'UpgradeKind',
                default_value: 'Rolling',
                type: {
                  name: 'String'
                }
              },
              rolling_upgrade_mode: {
                client_side_validation: true,
                required: false,
                serialized_name: 'RollingUpgradeMode',
                default_value: 'UnmonitoredAuto',
                type: {
                  name: 'String'
                }
              },
              upgrade_replica_set_check_timeout_in_seconds: {
                client_side_validation: true,
                required: false,
                serialized_name: 'UpgradeReplicaSetCheckTimeoutInSeconds',
                type: {
                  name: 'Number'
                }
              },
              force_restart: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ForceRestart',
                type: {
                  name: 'Boolean'
                }
              },
              enable_delta_health_evaluation: {
                client_side_validation: true,
                required: false,
                serialized_name: 'EnableDeltaHealthEvaluation',
                type: {
                  name: 'Boolean'
                }
              },
              monitoring_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'MonitoringPolicy',
                type: {
                  name: 'Composite',
                  class_name: 'MonitoringPolicyDescription'
                }
              },
              cluster_health_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ClusterHealthPolicy',
                type: {
                  name: 'Composite',
                  class_name: 'ClusterHealthPolicy'
                }
              },
              cluster_upgrade_health_policy: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ClusterUpgradeHealthPolicy',
                type: {
                  name: 'Composite',
                  class_name: 'ClusterUpgradeHealthPolicyObject'
                }
              },
              application_health_policy_map: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ApplicationHealthPolicyMap',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ApplicationHealthPolicyMapItemElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ApplicationHealthPolicyMapItem'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
