Record Class AggregationRequestSpec

java.lang.Object
java.lang.Record
org.graylog.plugins.views.search.rest.scriptingapi.request.AggregationRequestSpec
All Implemented Interfaces:
SearchRequestSpec

public record AggregationRequestSpec(String queryString, Set<String> streams, TimeRange timerange, @Valid @NotEmpty List<Grouping> groupings, @Valid @NotEmpty List<Metric> metrics) extends Record implements SearchRequestSpec
  • Constructor Details

    • AggregationRequestSpec

      public AggregationRequestSpec(String queryString, Set<String> streams, TimeRange timerange, @Valid @NotEmpty @Valid @NotEmpty List<Grouping> groupings, @Valid @NotEmpty @Valid @NotEmpty List<Metric> metrics)
      Creates an instance of a AggregationRequestSpec record class.
      Parameters:
      queryString - the value for the queryString record component
      streams - the value for the streams record component
      timerange - the value for the timerange record component
      groupings - the value for the groupings record component
      metrics - the value for the metrics record component
  • Method Details

    • hasCustomSort

      public boolean hasCustomSort()
    • getSchema

      public List<ResponseSchemaEntry> getSchema()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • queryString

      public String queryString()
      Returns the value of the queryString record component.
      Specified by:
      queryString in interface SearchRequestSpec
      Returns:
      the value of the queryString record component
    • streams

      public Set<String> streams()
      Returns the value of the streams record component.
      Specified by:
      streams in interface SearchRequestSpec
      Returns:
      the value of the streams record component
    • timerange

      public TimeRange timerange()
      Returns the value of the timerange record component.
      Specified by:
      timerange in interface SearchRequestSpec
      Returns:
      the value of the timerange record component
    • groupings

      @Valid @NotEmpty public @Valid @NotEmpty List<Grouping> groupings()
      Returns the value of the groupings record component.
      Returns:
      the value of the groupings record component
    • metrics

      @Valid @NotEmpty public @Valid @NotEmpty List<Metric> metrics()
      Returns the value of the metrics record component.
      Returns:
      the value of the metrics record component