# 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::V7_0_0_42 module Models # # Describes the average load trigger used for auto scaling. # class AverageLoadScalingTrigger < AutoScalingTrigger include MsRestAzure def initialize @kind = "AverageLoad" end attr_accessor :kind # @return [AutoScalingMetric] Description of the metric that is used for # scaling. attr_accessor :metric # @return [Float] Lower load threshold (if average load is below this # threshold, service will scale down). attr_accessor :lower_load_threshold # @return [Float] Upper load threshold (if average load is above this # threshold, service will scale up). attr_accessor :upper_load_threshold # @return [Integer] Scale interval that indicates how often will this # trigger be checked. attr_accessor :scale_interval_in_seconds # # Mapper for AverageLoadScalingTrigger class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { client_side_validation: true, required: false, serialized_name: 'AverageLoad', type: { name: 'Composite', class_name: 'AverageLoadScalingTrigger', model_properties: { kind: { client_side_validation: true, required: true, serialized_name: 'kind', type: { name: 'String' } }, metric: { client_side_validation: true, required: true, serialized_name: 'metric', type: { name: 'Composite', polymorphic_discriminator: 'kind', uber_parent: 'AutoScalingMetric', class_name: 'AutoScalingMetric' } }, lower_load_threshold: { client_side_validation: true, required: true, serialized_name: 'lowerLoadThreshold', type: { name: 'Double' } }, upper_load_threshold: { client_side_validation: true, required: true, serialized_name: 'upperLoadThreshold', type: { name: 'Double' } }, scale_interval_in_seconds: { client_side_validation: true, required: true, serialized_name: 'scaleIntervalInSeconds', constraints: { InclusiveMinimum: 60 }, type: { name: 'Number' } } } } } end end end end