Skip to content

Match

Match declares a condition and either an output or a nested rule.

new Match(sourceIdValue): Match

constructor associates the match with its source identifier.

number

Match

condition(): ValueString

condition returns the condition expression.

ValueString


explanation(): ValueString

explanation returns the explanation expression or an empty value.

ValueString


hasExplanation(): boolean

hasExplanation reports whether the explanation field is set.

boolean


hasOutput(): boolean

hasOutput reports whether the output field is set.

boolean


hasRule(): boolean

hasRule reports whether a nested rule is set.

boolean


output(): ValueString

output returns the output expression or an empty value.

ValueString


rule(): Rule | undefined

rule returns the nested rule when set.

Rule | undefined


setCondition(value): void

setCondition sets the CEL condition.

ValueString

void


setExplanation(value): void

setExplanation sets the CEL explanation expression.

ValueString

void


setOutput(value): void

setOutput sets the CEL output expression.

ValueString

void


setRule(value): void

setRule sets the nested rule.

Rule

void


sourceId(): number

sourceId returns the source identifier associated with the match.

number