# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization import Model
[docs]class ScaleRule(Model):
"""A rule that provide the triggers and parameters for the scaling action.
All required parameters must be populated in order to send to Azure.
:param metric_trigger: Required. the trigger that results in a scaling
action.
:type metric_trigger: ~azure.mgmt.monitor.models.MetricTrigger
:param scale_action: Required. the parameters for the scaling action.
:type scale_action: ~azure.mgmt.monitor.models.ScaleAction
"""
_validation = {
'metric_trigger': {'required': True},
'scale_action': {'required': True},
}
_attribute_map = {
'metric_trigger': {'key': 'metricTrigger', 'type': 'MetricTrigger'},
'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'},
}
def __init__(self, *, metric_trigger, scale_action, **kwargs) -> None:
super(ScaleRule, self).__init__(**kwargs)
self.metric_trigger = metric_trigger
self.scale_action = scale_action