Record Class DatadogLogIndex

java.lang.Object
java.lang.Record
codes.grow.packages.datadoglogs.DatadogLogIndex
Record Components:
name - index name
query - index filter query
retentionDays - retention in days
dailyLimit - daily event limit
rateLimited - whether the index is currently rate limited

public record DatadogLogIndex(String name, Optional<String> query, OptionalLong retentionDays, OptionalLong dailyLimit, Optional<Boolean> rateLimited) extends Record
One Datadog log index (GET /api/v1/logs/config/indexes).
  • Constructor Details

    • DatadogLogIndex

      public DatadogLogIndex(String name, Optional<String> query, OptionalLong retentionDays, OptionalLong dailyLimit, Optional<Boolean> rateLimited)
      Creates the record; null optionals become empty.
      Parameters:
      name - index name
      query - filter query
      retentionDays - retention
      dailyLimit - daily limit
      rateLimited - rate limited flag
  • Method Details

    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • query

      public Optional<String> query()
      Returns the value of the query record component.
      Returns:
      the value of the query record component
    • retentionDays

      public OptionalLong retentionDays()
      Returns the value of the retentionDays record component.
      Returns:
      the value of the retentionDays record component
    • dailyLimit

      public OptionalLong dailyLimit()
      Returns the value of the dailyLimit record component.
      Returns:
      the value of the dailyLimit record component
    • rateLimited

      public Optional<Boolean> rateLimited()
      Returns the value of the rateLimited record component.
      Returns:
      the value of the rateLimited record component