Record Class DataSourceConfigDefinition
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.DataSourceConfigDefinition
- Record Components:
name- the field's API name (e.g. "access_key", "region")secret- whether this field holds a credential or other sensitive valuecaseInsensitive- whether this field's values are case-insensitive (e.g. enum-like fields like "auth"). Case-insensitive fields are normalized to lowercase on input for consistent storage and comparison.federatedAuth- whether this field contributes to federated authentication (e.g. workload identity federation settings that replace explicit credentials). A field cannot be bothsecretandfederatedAuth: the two represent mutually exclusive authentication kinds, and combining them on a single field would make it self-conflict during validation.
public record DataSourceConfigDefinition(String name, boolean secret, boolean caseInsensitive, boolean federatedAuth)
extends Record
Metadata describing a datasource configuration field — its name, sensitivity, and
value semantics. Used by
DataSourceConfiguration subclasses to declare their
settings schema and drive validation. This is internal plugin machinery — it is never
exposed through the CRUD API or stored in cluster state. The validated output that
enters cluster state is DataSourceSetting.-
Constructor Summary
ConstructorsConstructorDescriptionDataSourceConfigDefinition(String name, boolean secret, boolean caseInsensitive, boolean federatedAuth) Creates an instance of aDataSourceConfigDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy whose values are treated as case-insensitive (normalized to lowercase on input).Returns a copy that marks this field as contributing to federated authentication.booleanReturns the value of thecaseInsensitiverecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefederatedAuthrecord component.final inthashCode()Returns a hash code value for this object.static Map<String, DataSourceConfigDefinition> mapOf(DataSourceConfigDefinition... definitions) Builds a definition map keyed by field name.name()Returns the value of thenamerecord component.static DataSourceConfigDefinitionA regular (non-secret) field.booleansecret()Returns the value of thesecretrecord component.static DataSourceConfigDefinitionA field that holds a credential.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataSourceConfigDefinition
public DataSourceConfigDefinition(String name, boolean secret, boolean caseInsensitive, boolean federatedAuth) Creates an instance of aDataSourceConfigDefinitionrecord class.- Parameters:
name- the value for thenamerecord componentsecret- the value for thesecretrecord componentcaseInsensitive- the value for thecaseInsensitiverecord componentfederatedAuth- the value for thefederatedAuthrecord component
-
-
Method Details
-
secret
A field that holds a credential. -
plaintext
A regular (non-secret) field. -
asCaseInsensitive
Returns a copy whose values are treated as case-insensitive (normalized to lowercase on input). -
asFederatedAuth
Returns a copy that marks this field as contributing to federated authentication. -
mapOf
public static Map<String,DataSourceConfigDefinition> mapOf(DataSourceConfigDefinition... definitions) Builds a definition map keyed by field name. Each name is typed once. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
secret
public boolean secret()Returns the value of thesecretrecord component.- Returns:
- the value of the
secretrecord component
-
caseInsensitive
public boolean caseInsensitive()Returns the value of thecaseInsensitiverecord component.- Returns:
- the value of the
caseInsensitiverecord component
-
federatedAuth
public boolean federatedAuth()Returns the value of thefederatedAuthrecord component.- Returns:
- the value of the
federatedAuthrecord component
-