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 Details

    • MultiMetricCriteria

      public MultiMetricCriteria()
      Creates an instance of MultiMetricCriteria class.
  • Method Details

    • criterionType

      public CriterionType criterionType()
      Get the criterionType property: Specifies the type of threshold criteria.
      Returns:
      the criterionType value.
    • name

      public String name()
      Get the name property: Name of the criteria.
      Returns:
      the name value.
    • withName

      public MultiMetricCriteria withName(String name)
      Set the name property: Name of the criteria.
      Parameters:
      name - the name value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • metricName

      public String metricName()
      Get the metricName property: Name of the metric.
      Returns:
      the metricName value.
    • withMetricName

      public MultiMetricCriteria withMetricName(String metricName)
      Set the metricName property: Name of the metric.
      Parameters:
      metricName - the metricName value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • metricNamespace

      public String metricNamespace()
      Get the metricNamespace property: Namespace of the metric.
      Returns:
      the metricNamespace value.
    • withMetricNamespace

      public MultiMetricCriteria withMetricNamespace(String metricNamespace)
      Set the metricNamespace property: Namespace of the metric.
      Parameters:
      metricNamespace - the metricNamespace value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • timeAggregation

      public AggregationTypeEnum timeAggregation()
      Get the timeAggregation property: the criteria time aggregation types.
      Returns:
      the timeAggregation value.
    • withTimeAggregation

      public MultiMetricCriteria withTimeAggregation(AggregationTypeEnum timeAggregation)
      Set the timeAggregation property: the criteria time aggregation types.
      Parameters:
      timeAggregation - the timeAggregation value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • dimensions

      public List<MetricDimension> dimensions()
      Get the dimensions property: List of dimension conditions.
      Returns:
      the dimensions value.
    • withDimensions

      public MultiMetricCriteria withDimensions(List<MetricDimension> dimensions)
      Set the dimensions property: List of dimension conditions.
      Parameters:
      dimensions - the dimensions value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • skipMetricValidation

      public Boolean 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

      public MultiMetricCriteria 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.
      Parameters:
      skipMetricValidation - the skipMetricValidation value to set.
      Returns:
      the MultiMetricCriteria object itself.
    • additionalProperties

      public Map<String,Object> additionalProperties()
      Get the additionalProperties property: The types of conditions for a multi resource alert.
      Returns:
      the additionalProperties value.
    • withAdditionalProperties

      public MultiMetricCriteria withAdditionalProperties(Map<String,Object> additionalProperties)
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<MultiMetricCriteria>
      Throws:
      IOException
    • fromJson

      public static MultiMetricCriteria fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.