Record Class AdapterCredentialRequirement
java.lang.Object
java.lang.Record
org.j7m.middleware.adapter.spi.AdapterCredentialRequirement
- Record Components:
name- stable credential namerequired- whether the adapter requires the credential before it can runsecret- whether values for this credential must always be redacteddescription- human-readable safe description of the credential purpose
public record AdapterCredentialRequirement(String name, boolean required, boolean secret, String description)
extends Record
Credential declaration required by an optional adapter.
The record is immutable and thread-safe. It describes credential shape and redaction requirements only; it never stores credential values. Equality is structural so reports can compare declarations across TCK runs.
-
Constructor Summary
ConstructorsConstructorDescriptionAdapterCredentialRequirement(String name, boolean required, boolean secret, String description) Creates a credential requirement. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanrequired()Returns the value of therequiredrecord component.booleansecret()Returns the value of thesecretrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AdapterCredentialRequirement
public AdapterCredentialRequirement(String name, boolean required, boolean secret, String description) Creates a credential requirement.- Throws:
IllegalArgumentException- ifnameordescriptionis blank
-
-
Method Details
-
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. -
name
-
required
-
secret
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-