Class MetricAlertStatus
java.lang.Object
com.azure.resourcemanager.monitor.models.MetricAlertStatus
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MetricAlertStatus>
public final class MetricAlertStatus
extends Object
implements com.azure.json.JsonSerializable<MetricAlertStatus>
An alert status.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricAlertStatus
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MetricAlertStatus from the JsonReader.id()
Get the id property: The alert rule arm id.name()
Get the name property: The status name.Get the properties property: The alert status properties of the metric alert status.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) type()
Get the type property: The extended resource type name.void
validate()
Validates the instance.Set the id property: The alert rule arm id.Set the name property: The status name.withProperties
(MetricAlertStatusProperties properties) Set the properties property: The alert status properties of the metric alert status.Set the type property: The extended resource type name.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
-
MetricAlertStatus
public MetricAlertStatus()Creates an instance of MetricAlertStatus class.
-
-
Method Details
-
name
Get the name property: The status name.- Returns:
- the name value.
-
withName
Set the name property: The status name.- Parameters:
name
- the name value to set.- Returns:
- the MetricAlertStatus object itself.
-
id
Get the id property: The alert rule arm id.- Returns:
- the id value.
-
withId
Set the id property: The alert rule arm id.- Parameters:
id
- the id value to set.- Returns:
- the MetricAlertStatus object itself.
-
type
Get the type property: The extended resource type name.- Returns:
- the type value.
-
withType
Set the type property: The extended resource type name.- Parameters:
type
- the type value to set.- Returns:
- the MetricAlertStatus object itself.
-
properties
Get the properties property: The alert status properties of the metric alert status.- Returns:
- the properties value.
-
withProperties
Set the properties property: The alert status properties of the metric alert status.- Parameters:
properties
- the properties value to set.- Returns:
- the MetricAlertStatus 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<MetricAlertStatus>
- Throws:
IOException
-
fromJson
Reads an instance of MetricAlertStatus from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MetricAlertStatus if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException
- If an error occurs while reading the MetricAlertStatus.
-