Class CreateRuleOptions

java.lang.Object
com.azure.messaging.servicebus.administration.models.CreateRuleOptions

public final class CreateRuleOptions extends Object
A set of options for creating a rule.
See Also:
  • Constructor Details

    • CreateRuleOptions

      public CreateRuleOptions()
      Initializes a new instance with the TrueRuleFilter.
    • CreateRuleOptions

      public CreateRuleOptions(RuleFilter filter)
      Initializes a new instance with the given rule name and filter.
      Parameters:
      filter - Filter expression used to match messages.
      Throws:
      NullPointerException - if filter is null.
    • CreateRuleOptions

      public CreateRuleOptions(RuleProperties ruleProperties)
      Initializes a new instance with the given rule properties.
      Parameters:
      ruleProperties - Rule properties to create new rule from.
      Throws:
      NullPointerException - if ruleProperties is null.
  • Method Details

    • getAction

      public RuleAction getAction()
      Gets the action to perform if the message satisfies the filtering expression.
      Returns:
      The action to perform if the message satisfies the filtering expression.
    • setAction

      public CreateRuleOptions setAction(RuleAction action)
      Sets the action to perform if the message satisfies the filtering expression.
      Parameters:
      action - The action to perform if the message satisfies the filtering expression.
      Returns:
      The updated CreateRuleOptions object.
    • getFilter

      public RuleFilter getFilter()
      Gets the filter expression used to match messages.
      Returns:
      The filter expression used to match messages.
    • setFilter

      public CreateRuleOptions setFilter(RuleFilter filter)
      Sets the filter expression used to match messages.
      Parameters:
      filter - The filter expression used to match messages.
      Returns:
      The updated CreateRuleOptions object.