Record Class IntakeSecurityScanner.ScanVerdict
java.lang.Object
java.lang.Record
ai.pipeline.connector.intake.security.IntakeSecurityScanner.ScanVerdict
- Enclosing class:
IntakeSecurityScanner
public static record IntakeSecurityScanner.ScanVerdict(boolean allowed, IntakeErrorCode code, String message)
extends Record
Outcome of a security scan: allowed, or a client-safe rejection code + message.
-
Constructor Summary
ConstructorsConstructorDescriptionScanVerdict(boolean allowed, IntakeErrorCode code, String message) Creates an instance of aScanVerdictrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowed()Returns the value of theallowedrecord component.code()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.booleanrejected()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ScanVerdict
Creates an instance of aScanVerdictrecord class.- Parameters:
allowed- the value for theallowedrecord componentcode- the value for thecoderecord componentmessage- the value for themessagerecord component
-
-
Method Details
-
rejected
public boolean rejected() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
allowed
public boolean allowed()Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-