public class CustomRule extends Object
| Constructor and Description |
|---|
CustomRule() |
| Modifier and Type | Method and Description |
|---|---|
ActionType |
action()
Get the action property: Describes what action to be applied when rule matches.
|
CustomRuleEnabledState |
enabledState()
Get the enabledState property: Describes if the custom rule is in enabled or disabled state.
|
List<MatchCondition> |
matchConditions()
Get the matchConditions property: List of match conditions.
|
String |
name()
Get the name property: Defines the name of the custom rule.
|
int |
priority()
Get the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.
|
void |
validate()
Validates the instance.
|
CustomRule |
withAction(ActionType action)
Set the action property: Describes what action to be applied when rule matches.
|
CustomRule |
withEnabledState(CustomRuleEnabledState enabledState)
Set the enabledState property: Describes if the custom rule is in enabled or disabled state.
|
CustomRule |
withMatchConditions(List<MatchCondition> matchConditions)
Set the matchConditions property: List of match conditions.
|
CustomRule |
withName(String name)
Set the name property: Defines the name of the custom rule.
|
CustomRule |
withPriority(int priority)
Set the priority property: Defines in what order this rule be evaluated in the overall list of custom rules.
|
public String name()
public CustomRule withName(String name)
name - the name value to set.public CustomRuleEnabledState enabledState()
public CustomRule withEnabledState(CustomRuleEnabledState enabledState)
enabledState - the enabledState value to set.public int priority()
public CustomRule withPriority(int priority)
priority - the priority value to set.public List<MatchCondition> matchConditions()
public CustomRule withMatchConditions(List<MatchCondition> matchConditions)
matchConditions - the matchConditions value to set.public ActionType action()
public CustomRule withAction(ActionType action)
action - the action value to set.public void validate()
IllegalArgumentException - thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.