Class WebtestLocationAvailabilityCriteria

java.lang.Object
com.azure.resourcemanager.monitor.models.MetricAlertCriteria
com.azure.resourcemanager.monitor.models.WebtestLocationAvailabilityCriteria
All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricAlertCriteria>

public final class WebtestLocationAvailabilityCriteria extends MetricAlertCriteria
Specifies the metric alert rule criteria for a web test resource.
  • Constructor Details

    • WebtestLocationAvailabilityCriteria

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

    • odataType

      public Odatatype odataType()
      Get the odataType property: specifies the type of the alert criteria.
      Overrides:
      odataType in class MetricAlertCriteria
      Returns:
      the odataType value.
    • webTestId

      public String webTestId()
      Get the webTestId property: The Application Insights web test Id.
      Returns:
      the webTestId value.
    • withWebTestId

      public WebtestLocationAvailabilityCriteria withWebTestId(String webTestId)
      Set the webTestId property: The Application Insights web test Id.
      Parameters:
      webTestId - the webTestId value to set.
      Returns:
      the WebtestLocationAvailabilityCriteria object itself.
    • componentId

      public String componentId()
      Get the componentId property: The Application Insights resource Id.
      Returns:
      the componentId value.
    • withComponentId

      public WebtestLocationAvailabilityCriteria withComponentId(String componentId)
      Set the componentId property: The Application Insights resource Id.
      Parameters:
      componentId - the componentId value to set.
      Returns:
      the WebtestLocationAvailabilityCriteria object itself.
    • failedLocationCount

      public float failedLocationCount()
      Get the failedLocationCount property: The number of failed locations.
      Returns:
      the failedLocationCount value.
    • withFailedLocationCount

      public WebtestLocationAvailabilityCriteria withFailedLocationCount(float failedLocationCount)
      Set the failedLocationCount property: The number of failed locations.
      Parameters:
      failedLocationCount - the failedLocationCount value to set.
      Returns:
      the WebtestLocationAvailabilityCriteria object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class MetricAlertCriteria
      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<MetricAlertCriteria>
      Overrides:
      toJson in class MetricAlertCriteria
      Throws:
      IOException
    • fromJson

      public static WebtestLocationAvailabilityCriteria fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of WebtestLocationAvailabilityCriteria from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of WebtestLocationAvailabilityCriteria 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 WebtestLocationAvailabilityCriteria.