# 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::Monitor::Mgmt::V2015_04_01
  module Models
    #
    # A rule that provide the triggers and parameters for the scaling action.
    #
    class ScaleRule

      include MsRestAzure

      # @return [MetricTrigger] the trigger that results in a scaling action.
      attr_accessor :metric_trigger

      # @return [ScaleAction] the parameters for the scaling action.
      attr_accessor :scale_action


      #
      # Mapper for ScaleRule class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ScaleRule',
          type: {
            name: 'Composite',
            class_name: 'ScaleRule',
            model_properties: {
              metric_trigger: {
                client_side_validation: true,
                required: true,
                serialized_name: 'metricTrigger',
                type: {
                  name: 'Composite',
                  class_name: 'MetricTrigger'
                }
              },
              scale_action: {
                client_side_validation: true,
                required: true,
                serialized_name: 'scaleAction',
                type: {
                  name: 'Composite',
                  class_name: 'ScaleAction'
                }
              }
            }
          }
        }
      end
    end
  end
end
