MonitoredSubscription Class

  • java.lang.Object
    • com.azure.resourcemanager.datadog.models.MonitoredSubscription

Implements

public final class MonitoredSubscription
implements JsonSerializable<MonitoredSubscription>

The list of subscriptions and it's monitoring status by current Datadog monitor.

Constructor Summary

Constructor Description
MonitoredSubscription()

Creates an instance of MonitoredSubscription class.

Method Summary

Modifier and Type Method and Description
String error()

Get the error property: The reason of not monitoring the subscription.

static MonitoredSubscription fromJson(JsonReader jsonReader)

Reads an instance of MonitoredSubscription from the JsonReader.

Status status()

Get the status property: The state of monitoring.

String subscriptionId()

Get the subscriptionId property: The subscriptionId to be monitored.

MonitoringTagRulesProperties tagRules()

Get the tagRules property: Definition of the properties for a TagRules resource.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

MonitoredSubscription withError(String error)

Set the error property: The reason of not monitoring the subscription.

MonitoredSubscription withStatus(Status status)

Set the status property: The state of monitoring.

MonitoredSubscription withSubscriptionId(String subscriptionId)

Set the subscriptionId property: The subscriptionId to be monitored.

MonitoredSubscription withTagRules(MonitoringTagRulesProperties tagRules)

Set the tagRules property: Definition of the properties for a TagRules resource.

Methods inherited from java.lang.Object

Constructor Details

MonitoredSubscription

public MonitoredSubscription()

Creates an instance of MonitoredSubscription class.

Method Details

error

public String error()

Get the error property: The reason of not monitoring the subscription.

Returns:

the error value.

fromJson

public static MonitoredSubscription fromJson(JsonReader jsonReader)

Reads an instance of MonitoredSubscription from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of MonitoredSubscription 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 MonitoredSubscription.

status

public Status status()

Get the status property: The state of monitoring.

Returns:

the status value.

subscriptionId

public String subscriptionId()

Get the subscriptionId property: The subscriptionId to be monitored.

Returns:

the subscriptionId value.

tagRules

public MonitoringTagRulesProperties tagRules()

Get the tagRules property: Definition of the properties for a TagRules resource.

Returns:

the tagRules value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withError

public MonitoredSubscription withError(String error)

Set the error property: The reason of not monitoring the subscription.

Parameters:

error - the error value to set.

Returns:

the MonitoredSubscription object itself.

withStatus

public MonitoredSubscription withStatus(Status status)

Set the status property: The state of monitoring.

Parameters:

status - the status value to set.

Returns:

the MonitoredSubscription object itself.

withSubscriptionId

public MonitoredSubscription withSubscriptionId(String subscriptionId)

Set the subscriptionId property: The subscriptionId to be monitored.

Parameters:

subscriptionId - the subscriptionId value to set.

Returns:

the MonitoredSubscription object itself.

withTagRules

public MonitoredSubscription withTagRules(MonitoringTagRulesProperties tagRules)

Set the tagRules property: Definition of the properties for a TagRules resource.

Parameters:

tagRules - the tagRules value to set.

Returns:

the MonitoredSubscription object itself.

Applies to