Record Class DataGeneratorSpecification

java.lang.Object
java.lang.Record
org.elasticsearch.logsdb.datageneration.DataGeneratorSpecification
Record Components:
dataSource - source of generated data
maxFieldCountPerLevel - maximum number of fields that an individual object in mapping has. Applies to subobjects.
maxObjectDepth - maximum depth of nested objects
nestedFieldsLimit - how many total nested fields can be present in a produced mapping
fullyDynamicMapping - 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.
  • Constructor Details

    • DataGeneratorSpecification

      public DataGeneratorSpecification(DataSource dataSource, int maxFieldCountPerLevel, int maxObjectDepth, int nestedFieldsLimit, boolean fullyDynamicMapping, List<PredefinedField> predefinedFields)
      Creates an instance of a DataGeneratorSpecification record class.
      Parameters:
      dataSource - the value for the dataSource record component
      maxFieldCountPerLevel - the value for the maxFieldCountPerLevel record component
      maxObjectDepth - the value for the maxObjectDepth record component
      nestedFieldsLimit - the value for the nestedFieldsLimit record component
      fullyDynamicMapping - the value for the fullyDynamicMapping record component
      predefinedFields - the value for the predefinedFields record component
  • Method Details

    • builder

      public static DataGeneratorSpecification.Builder builder()
    • buildDefault

      public static DataGeneratorSpecification buildDefault()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dataSource

      public DataSource dataSource()
      Returns the value of the dataSource record component.
      Returns:
      the value of the dataSource record component
    • maxFieldCountPerLevel

      public int maxFieldCountPerLevel()
      Returns the value of the maxFieldCountPerLevel record component.
      Returns:
      the value of the maxFieldCountPerLevel record component
    • maxObjectDepth

      public int maxObjectDepth()
      Returns the value of the maxObjectDepth record component.
      Returns:
      the value of the maxObjectDepth record component
    • nestedFieldsLimit

      public int nestedFieldsLimit()
      Returns the value of the nestedFieldsLimit record component.
      Returns:
      the value of the nestedFieldsLimit record component
    • fullyDynamicMapping

      public boolean fullyDynamicMapping()
      Returns the value of the fullyDynamicMapping record component.
      Returns:
      the value of the fullyDynamicMapping record component
    • predefinedFields

      public List<PredefinedField> predefinedFields()
      Returns the value of the predefinedFields record component.
      Returns:
      the value of the predefinedFields record component