ScaleRuleInner Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.fluent.models.ScaleRuleInner

Implements

public final class ScaleRuleInner
implements JsonSerializable<ScaleRuleInner>

A rule that provide the triggers and parameters for the scaling action.

Constructor Summary

Constructor Description
ScaleRuleInner()

Creates an instance of ScaleRuleInner class.

Method Summary

Modifier and Type Method and Description
static ScaleRuleInner fromJson(JsonReader jsonReader)

Reads an instance of ScaleRuleInner from the JsonReader.

MetricTrigger metricTrigger()

Get the metricTrigger property: the trigger that results in a scaling action.

ScaleAction scaleAction()

Get the scaleAction property: the parameters for the scaling action.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ScaleRuleInner withMetricTrigger(MetricTrigger metricTrigger)

Set the metricTrigger property: the trigger that results in a scaling action.

ScaleRuleInner withScaleAction(ScaleAction scaleAction)

Set the scaleAction property: the parameters for the scaling action.

Methods inherited from java.lang.Object

Constructor Details

ScaleRuleInner

public ScaleRuleInner()

Creates an instance of ScaleRuleInner class.

Method Details

fromJson

public static ScaleRuleInner fromJson(JsonReader jsonReader)

Reads an instance of ScaleRuleInner from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ScaleRuleInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

metricTrigger

public MetricTrigger metricTrigger()

Get the metricTrigger property: the trigger that results in a scaling action.

Returns:

the metricTrigger value.

scaleAction

public ScaleAction scaleAction()

Get the scaleAction property: the parameters for the scaling action.

Returns:

the scaleAction value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withMetricTrigger

public ScaleRuleInner withMetricTrigger(MetricTrigger metricTrigger)

Set the metricTrigger property: the trigger that results in a scaling action.

Parameters:

metricTrigger - the metricTrigger value to set.

Returns:

the ScaleRuleInner object itself.

withScaleAction

public ScaleRuleInner withScaleAction(ScaleAction scaleAction)

Set the scaleAction property: the parameters for the scaling action.

Parameters:

scaleAction - the scaleAction value to set.

Returns:

the ScaleRuleInner object itself.

Applies to