# 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::Compute::Mgmt::V2018_04_01
module Models
#
# Describes an upgrade policy - automatic, manual, or rolling.
#
class UpgradePolicy
include MsRestAzure
# @return [UpgradeMode] Specifies the mode of an upgrade to virtual
# machines in the scale set.
Possible values are:
# **Manual** - You control the application of updates to virtual
# machines in the scale set. You do this by using the manualUpgrade
# action.
**Automatic** - All virtual machines in the scale
# set are automatically updated at the same time. Possible values
# include: 'Automatic', 'Manual', 'Rolling'
attr_accessor :mode
# @return [RollingUpgradePolicy] The configuration parameters used while
# performing a rolling upgrade.
attr_accessor :rolling_upgrade_policy
# @return [Boolean] Whether OS upgrades should automatically be applied
# to scale set instances in a rolling fashion when a newer version of the
# image becomes available.
attr_accessor :automatic_osupgrade
# @return [AutoOSUpgradePolicy] Configuration parameters used for
# performing automatic OS Upgrade.
attr_accessor :auto_osupgrade_policy
#
# Mapper for UpgradePolicy class as Ruby Hash.
# This will be used for serialization/deserialization.
#
def self.mapper()
{
client_side_validation: true,
required: false,
serialized_name: 'UpgradePolicy',
type: {
name: 'Composite',
class_name: 'UpgradePolicy',
model_properties: {
mode: {
client_side_validation: true,
required: false,
serialized_name: 'mode',
type: {
name: 'Enum',
module: 'UpgradeMode'
}
},
rolling_upgrade_policy: {
client_side_validation: true,
required: false,
serialized_name: 'rollingUpgradePolicy',
type: {
name: 'Composite',
class_name: 'RollingUpgradePolicy'
}
},
automatic_osupgrade: {
client_side_validation: true,
required: false,
serialized_name: 'automaticOSUpgrade',
type: {
name: 'Boolean'
}
},
auto_osupgrade_policy: {
client_side_validation: true,
required: false,
serialized_name: 'autoOSUpgradePolicy',
type: {
name: 'Composite',
class_name: 'AutoOSUpgradePolicy'
}
}
}
}
}
end
end
end
end