Record Class Tm1ErrorClassifier.Rule
java.lang.Object
java.lang.Record
io.skipcheck.tm1.client.error.Tm1ErrorClassifier.Rule
- Record Components:
status- the HTTP status to match, ornullfor anycode- the error code to match, ornullfor anymessage- a pattern to find in the message, ornullfor anykind- the kind to report on a match
- Enclosing class:
Tm1ErrorClassifier
public static record Tm1ErrorClassifier.Rule(@Nullable Integer status, @Nullable String code, @Nullable Pattern message, Tm1ErrorKind kind)
extends Record
One classification rule. Each condition that's set must match: the status if not
null, the code exactly, and the message pattern (case-insensitive, anywhere in the
message).
-
Constructor Summary
ConstructorsConstructorDescriptionRule(@Nullable Integer status, @Nullable String code, @Nullable Pattern message, Tm1ErrorKind kind) Checks that the rule has a kind and at least one condition. -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringcode()Returns the value of thecoderecord component.static Tm1ErrorClassifier.Rulecode(String code, Tm1ErrorKind kind) A rule matching an error code.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.@Nullable Patternmessage()Returns the value of themessagerecord component.static Tm1ErrorClassifier.Rulemessage(String regex, Tm1ErrorKind kind) A rule matching a message pattern, case-insensitively.@Nullable Integerstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Rule
public Rule(@Nullable Integer status, @Nullable String code, @Nullable Pattern message, Tm1ErrorKind kind) Checks that the rule has a kind and at least one condition.
-
-
Method Details
-
message
A rule matching a message pattern, case-insensitively.- Parameters:
regex- the pattern to find anywhere in the messagekind- the kind to report on a match- Returns:
- the rule
-
code
A rule matching an error code.- Parameters:
code- the error code to match exactly, such as"248"kind- the kind to report on a match- Returns:
- the rule
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
status
-
code
-
message
-
kind
-