Partager via


MetricAlertStatus Class

  • java.lang.Object
    • com.azure.resourcemanager.monitor.models.MetricAlertStatus

Implements

public final class MetricAlertStatus
implements JsonSerializable<MetricAlertStatus>

An alert status.

Constructor Summary

Constructor Description
MetricAlertStatus()

Creates an instance of MetricAlertStatus class.

Method Summary

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

Reads an instance of MetricAlertStatus from the JsonReader.

String id()

Get the id property: The alert rule arm id.

String name()

Get the name property: The status name.

MetricAlertStatusProperties properties()

Get the properties property: The alert status properties of the metric alert status.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The extended resource type name.

void validate()

Validates the instance.

MetricAlertStatus withId(String id)

Set the id property: The alert rule arm id.

MetricAlertStatus withName(String name)

Set the name property: The status name.

MetricAlertStatus withProperties(MetricAlertStatusProperties properties)

Set the properties property: The alert status properties of the metric alert status.

MetricAlertStatus withType(String type)

Set the type property: The extended resource type name.

Methods inherited from java.lang.Object

Constructor Details

MetricAlertStatus

public MetricAlertStatus()

Creates an instance of MetricAlertStatus class.

Method Details

fromJson

public static MetricAlertStatus fromJson(JsonReader jsonReader)

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.

id

public String id()

Get the id property: The alert rule arm id.

Returns:

the id value.

name

public String name()

Get the name property: The status name.

Returns:

the name value.

properties

public MetricAlertStatusProperties properties()

Get the properties property: The alert status properties of the metric alert status.

Returns:

the properties value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The extended resource type name.

Returns:

the type value.

validate

public void validate()

Validates the instance.

withId

public MetricAlertStatus withId(String id)

Set the id property: The alert rule arm id.

Parameters:

id - the id value to set.

Returns:

the MetricAlertStatus object itself.

withName

public MetricAlertStatus withName(String name)

Set the name property: The status name.

Parameters:

name - the name value to set.

Returns:

the MetricAlertStatus object itself.

withProperties

public MetricAlertStatus withProperties(MetricAlertStatusProperties properties)

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.

withType

public MetricAlertStatus withType(String type)

Set the type property: The extended resource type name.

Parameters:

type - the type value to set.

Returns:

the MetricAlertStatus object itself.

Applies to