Interface ConditionalBehavior.Builder

  • Method Details

    • rules

      An ordered list of conditional rules. Rules are evaluated top-to-bottom and the first rule whose conditions all evaluate to true determines the field's behavior. Rules whose conditions do not all match are skipped and evaluation continues to the next rule.

      Parameters:
      rules - An ordered list of conditional rules. Rules are evaluated top-to-bottom and the first rule whose conditions all evaluate to true determines the field's behavior. Rules whose conditions do not all match are skipped and evaluation continues to the next rule.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rules

      An ordered list of conditional rules. Rules are evaluated top-to-bottom and the first rule whose conditions all evaluate to true determines the field's behavior. Rules whose conditions do not all match are skipped and evaluation continues to the next rule.

      Parameters:
      rules - An ordered list of conditional rules. Rules are evaluated top-to-bottom and the first rule whose conditions all evaluate to true determines the field's behavior. Rules whose conditions do not all match are skipped and evaluation continues to the next rule.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • rules

      An ordered list of conditional rules. Rules are evaluated top-to-bottom and the first rule whose conditions all evaluate to true determines the field's behavior. Rules whose conditions do not all match are skipped and evaluation continues to the next rule.

      This is a convenience method that creates an instance of the ConditionalRule.Builder avoiding the need to create one manually via ConditionalRule.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to rules(List<ConditionalRule>).

      Parameters:
      rules - a consumer that will call methods on ConditionalRule.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • defaultBehavior

      ConditionalBehavior.Builder defaultBehavior(String defaultBehavior)

      The field behavior that applies when no conditional rule in Rules matches. Valid values are REQUIRED, OPTIONAL, and DISALLOWED.

      Parameters:
      defaultBehavior - The field behavior that applies when no conditional rule in Rules matches. Valid values are REQUIRED, OPTIONAL, and DISALLOWED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.