Package org.elasticsearch.datageneration
Record Class DataGeneratorSpecification
java.lang.Object
java.lang.Record
org.elasticsearch.datageneration.DataGeneratorSpecification
- Record Components:
dataSource- source of generated datamaxFieldCountPerLevel- maximum number of fields that an individual object in mapping has. Applies to subobjects.maxObjectDepth- maximum depth of nested objectsnestedFieldsLimit- how many total nested fields can be present in a produced mappingfullyDynamicMapping- if the mapping is fully dynamic, meaning none of the fields are mapped (essentially mapping is empty)predefinedFields- predefined fields that must be present in mapping and documents. Only top level fields are supported.
public record DataGeneratorSpecification(DataSource dataSource, int maxFieldCountPerLevel, int maxObjectDepth, int nestedFieldsLimit, boolean fullyDynamicMapping, List<PredefinedField> predefinedFields)
extends Record
Allows configuring behavior of data generation components.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDataGeneratorSpecification(DataSource dataSource, int maxFieldCountPerLevel, int maxObjectDepth, int nestedFieldsLimit, boolean fullyDynamicMapping, List<PredefinedField> predefinedFields) Creates an instance of aDataGeneratorSpecificationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DataGeneratorSpecificationbuilder()Returns the value of thedataSourcerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefullyDynamicMappingrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxFieldCountPerLevelrecord component.intReturns the value of themaxObjectDepthrecord component.intReturns the value of thenestedFieldsLimitrecord component.Returns the value of thepredefinedFieldsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DataGeneratorSpecification
public DataGeneratorSpecification(DataSource dataSource, int maxFieldCountPerLevel, int maxObjectDepth, int nestedFieldsLimit, boolean fullyDynamicMapping, List<PredefinedField> predefinedFields) Creates an instance of aDataGeneratorSpecificationrecord class.- Parameters:
dataSource- the value for thedataSourcerecord componentmaxFieldCountPerLevel- the value for themaxFieldCountPerLevelrecord componentmaxObjectDepth- the value for themaxObjectDepthrecord componentnestedFieldsLimit- the value for thenestedFieldsLimitrecord componentfullyDynamicMapping- the value for thefullyDynamicMappingrecord componentpredefinedFields- the value for thepredefinedFieldsrecord component
-
-
Method Details
-
builder
-
buildDefault
-
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 '=='. -
dataSource
Returns the value of thedataSourcerecord component.- Returns:
- the value of the
dataSourcerecord component
-
maxFieldCountPerLevel
public int maxFieldCountPerLevel()Returns the value of themaxFieldCountPerLevelrecord component.- Returns:
- the value of the
maxFieldCountPerLevelrecord component
-
maxObjectDepth
public int maxObjectDepth()Returns the value of themaxObjectDepthrecord component.- Returns:
- the value of the
maxObjectDepthrecord component
-
nestedFieldsLimit
public int nestedFieldsLimit()Returns the value of thenestedFieldsLimitrecord component.- Returns:
- the value of the
nestedFieldsLimitrecord component
-
fullyDynamicMapping
public boolean fullyDynamicMapping()Returns the value of thefullyDynamicMappingrecord component.- Returns:
- the value of the
fullyDynamicMappingrecord component
-
predefinedFields
Returns the value of thepredefinedFieldsrecord component.- Returns:
- the value of the
predefinedFieldsrecord component
-