AlertProcessingRuleProperties Class

  • java.lang.Object
    • com.azure.resourcemanager.alertsmanagement.models.AlertProcessingRuleProperties

Implements

public final class AlertProcessingRuleProperties
implements JsonSerializable<AlertProcessingRuleProperties>

Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.

Constructor Summary

Constructor Description
AlertProcessingRuleProperties()

Creates an instance of AlertProcessingRuleProperties class.

Method Summary

Modifier and Type Method and Description
List<Action> actions()

Get the actions property: Actions to be applied.

List<Condition> conditions()

Get the conditions property: Conditions on which alerts will be filtered.

String description()

Get the description property: Description of alert processing rule.

Boolean enabled()

Get the enabled property: Indicates if the given alert processing rule is enabled or disabled.

static AlertProcessingRuleProperties fromJson(JsonReader jsonReader)

Reads an instance of AlertProcessingRuleProperties from the JsonReader.

Schedule schedule()

Get the schedule property: Scheduling for alert processing rule.

List<String> scopes()

Get the scopes property: Scopes on which alert processing rule will apply.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

AlertProcessingRuleProperties withActions(List<Action> actions)

Set the actions property: Actions to be applied.

AlertProcessingRuleProperties withConditions(List<Condition> conditions)

Set the conditions property: Conditions on which alerts will be filtered.

AlertProcessingRuleProperties withDescription(String description)

Set the description property: Description of alert processing rule.

AlertProcessingRuleProperties withEnabled(Boolean enabled)

Set the enabled property: Indicates if the given alert processing rule is enabled or disabled.

AlertProcessingRuleProperties withSchedule(Schedule schedule)

Set the schedule property: Scheduling for alert processing rule.

AlertProcessingRuleProperties withScopes(List<String> scopes)

Set the scopes property: Scopes on which alert processing rule will apply.

Methods inherited from java.lang.Object

Constructor Details

AlertProcessingRuleProperties

public AlertProcessingRuleProperties()

Creates an instance of AlertProcessingRuleProperties class.

Method Details

actions

public List<Action> actions()

Get the actions property: Actions to be applied.

Returns:

the actions value.

conditions

public List<Condition> conditions()

Get the conditions property: Conditions on which alerts will be filtered.

Returns:

the conditions value.

description

public String description()

Get the description property: Description of alert processing rule.

Returns:

the description value.

enabled

public Boolean enabled()

Get the enabled property: Indicates if the given alert processing rule is enabled or disabled.

Returns:

the enabled value.

fromJson

public static AlertProcessingRuleProperties fromJson(JsonReader jsonReader)

Reads an instance of AlertProcessingRuleProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of AlertProcessingRuleProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

schedule

public Schedule schedule()

Get the schedule property: Scheduling for alert processing rule.

Returns:

the schedule value.

scopes

public List<String> scopes()

Get the scopes property: Scopes on which alert processing rule will apply.

Returns:

the scopes value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withActions

public AlertProcessingRuleProperties withActions(List<Action> actions)

Set the actions property: Actions to be applied.

Parameters:

actions - the actions value to set.

Returns:

the AlertProcessingRuleProperties object itself.

withConditions

public AlertProcessingRuleProperties withConditions(List<Condition> conditions)

Set the conditions property: Conditions on which alerts will be filtered.

Parameters:

conditions - the conditions value to set.

Returns:

the AlertProcessingRuleProperties object itself.

withDescription

public AlertProcessingRuleProperties withDescription(String description)

Set the description property: Description of alert processing rule.

Parameters:

description - the description value to set.

Returns:

the AlertProcessingRuleProperties object itself.

withEnabled

public AlertProcessingRuleProperties withEnabled(Boolean enabled)

Set the enabled property: Indicates if the given alert processing rule is enabled or disabled.

Parameters:

enabled - the enabled value to set.

Returns:

the AlertProcessingRuleProperties object itself.

withSchedule

public AlertProcessingRuleProperties withSchedule(Schedule schedule)

Set the schedule property: Scheduling for alert processing rule.

Parameters:

schedule - the schedule value to set.

Returns:

the AlertProcessingRuleProperties object itself.

withScopes

public AlertProcessingRuleProperties withScopes(List<String> scopes)

Set the scopes property: Scopes on which alert processing rule will apply.

Parameters:

scopes - the scopes value to set.

Returns:

the AlertProcessingRuleProperties object itself.

Applies to