Class MultiMetricCriteria
java.lang.Object
com.azure.resourcemanager.monitor.models.MultiMetricCriteria
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MultiMetricCriteria>
- Direct Known Subclasses:
DynamicMetricCriteria
,MetricCriteria
public class MultiMetricCriteria
extends Object
implements com.azure.json.JsonSerializable<MultiMetricCriteria>
The types of conditions for a multi resource alert.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the additionalProperties property: The types of conditions for a multi resource alert.Get the criterionType property: Specifies the type of threshold criteria.Get the dimensions property: List of dimension conditions.static MultiMetricCriteria
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MultiMetricCriteria from the JsonReader.Get the metricName property: Name of the metric.Get the metricNamespace property: Namespace of the metric.name()
Get the name property: Name of the criteria.Get the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.Get the timeAggregation property: the criteria time aggregation types.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.withAdditionalProperties
(Map<String, Object> additionalProperties) Set the additionalProperties property: The types of conditions for a multi resource alert.withDimensions
(List<MetricDimension> dimensions) Set the dimensions property: List of dimension conditions.withMetricName
(String metricName) Set the metricName property: Name of the metric.withMetricNamespace
(String metricNamespace) Set the metricNamespace property: Namespace of the metric.Set the name property: Name of the criteria.withSkipMetricValidation
(Boolean skipMetricValidation) Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.withTimeAggregation
(AggregationTypeEnum timeAggregation) Set the timeAggregation property: the criteria time aggregation types.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MultiMetricCriteria
public MultiMetricCriteria()Creates an instance of MultiMetricCriteria class.
-
-
Method Details
-
criterionType
Get the criterionType property: Specifies the type of threshold criteria.- Returns:
- the criterionType value.
-
name
Get the name property: Name of the criteria.- Returns:
- the name value.
-
withName
Set the name property: Name of the criteria.- Parameters:
name
- the name value to set.- Returns:
- the MultiMetricCriteria object itself.
-
metricName
Get the metricName property: Name of the metric.- Returns:
- the metricName value.
-
withMetricName
Set the metricName property: Name of the metric.- Parameters:
metricName
- the metricName value to set.- Returns:
- the MultiMetricCriteria object itself.
-
metricNamespace
Get the metricNamespace property: Namespace of the metric.- Returns:
- the metricNamespace value.
-
withMetricNamespace
Set the metricNamespace property: Namespace of the metric.- Parameters:
metricNamespace
- the metricNamespace value to set.- Returns:
- the MultiMetricCriteria object itself.
-
timeAggregation
Get the timeAggregation property: the criteria time aggregation types.- Returns:
- the timeAggregation value.
-
withTimeAggregation
Set the timeAggregation property: the criteria time aggregation types.- Parameters:
timeAggregation
- the timeAggregation value to set.- Returns:
- the MultiMetricCriteria object itself.
-
dimensions
Get the dimensions property: List of dimension conditions.- Returns:
- the dimensions value.
-
withDimensions
Set the dimensions property: List of dimension conditions.- Parameters:
dimensions
- the dimensions value to set.- Returns:
- the MultiMetricCriteria object itself.
-
skipMetricValidation
Get the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.- Returns:
- the skipMetricValidation value.
-
withSkipMetricValidation
Set the skipMetricValidation property: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.- Parameters:
skipMetricValidation
- the skipMetricValidation value to set.- Returns:
- the MultiMetricCriteria object itself.
-
additionalProperties
Get the additionalProperties property: The types of conditions for a multi resource alert.- Returns:
- the additionalProperties value.
-
withAdditionalProperties
Set the additionalProperties property: The types of conditions for a multi resource alert.- Parameters:
additionalProperties
- the additionalProperties value to set.- Returns:
- the MultiMetricCriteria object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MultiMetricCriteria>
- Throws:
IOException
-
fromJson
Reads an instance of MultiMetricCriteria from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MultiMetricCriteria if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException
- If the deserialized JSON object was missing any required properties.IOException
- If an error occurs while reading the MultiMetricCriteria.
-