Share via


ManagedRuleOverride Class

  • java.lang.Object
    • com.azure.resourcemanager.cdn.models.ManagedRuleOverride

Implements

public final class ManagedRuleOverride
implements JsonSerializable<ManagedRuleOverride>

Defines a managed rule group override setting.

Constructor Summary

Constructor Description
ManagedRuleOverride()

Creates an instance of ManagedRuleOverride class.

Method Summary

Modifier and Type Method and Description
ActionType action()

Get the action property: Describes the override action to be applied when rule matches.

ManagedRuleEnabledState enabledState()

Get the enabledState property: Describes if the managed rule is in enabled or disabled state.

static ManagedRuleOverride fromJson(JsonReader jsonReader)

Reads an instance of ManagedRuleOverride from the JsonReader.

String ruleId()

Get the ruleId property: Identifier for the managed rule.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ManagedRuleOverride withAction(ActionType action)

Set the action property: Describes the override action to be applied when rule matches.

ManagedRuleOverride withEnabledState(ManagedRuleEnabledState enabledState)

Set the enabledState property: Describes if the managed rule is in enabled or disabled state.

ManagedRuleOverride withRuleId(String ruleId)

Set the ruleId property: Identifier for the managed rule.

Methods inherited from java.lang.Object

Constructor Details

ManagedRuleOverride

public ManagedRuleOverride()

Creates an instance of ManagedRuleOverride class.

Method Details

action

public ActionType action()

Get the action property: Describes the override action to be applied when rule matches.

Returns:

the action value.

enabledState

public ManagedRuleEnabledState enabledState()

Get the enabledState property: Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

Returns:

the enabledState value.

fromJson

public static ManagedRuleOverride fromJson(JsonReader jsonReader)

Reads an instance of ManagedRuleOverride from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

ruleId

public String ruleId()

Get the ruleId property: Identifier for the managed rule.

Returns:

the ruleId value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAction

public ManagedRuleOverride withAction(ActionType action)

Set the action property: Describes the override action to be applied when rule matches.

Parameters:

action - the action value to set.

Returns:

the ManagedRuleOverride object itself.

withEnabledState

public ManagedRuleOverride withEnabledState(ManagedRuleEnabledState enabledState)

Set the enabledState property: Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified.

Parameters:

enabledState - the enabledState value to set.

Returns:

the ManagedRuleOverride object itself.

withRuleId

public ManagedRuleOverride withRuleId(String ruleId)

Set the ruleId property: Identifier for the managed rule.

Parameters:

ruleId - the ruleId value to set.

Returns:

the ManagedRuleOverride object itself.

Applies to