Record Class AgentInfo

java.lang.Object
java.lang.Record
codes.grow.packages.datadogapm.AgentInfo
Record Components:
version - Agent version, e.g. 7.85.4 (empty when not reported)
gitCommit - Agent build commit (empty when not reported)
endpoints - trace intake endpoints the Agent serves
config - the Agent's reported configuration
raw - the whole document

public record AgentInfo(String version, String gitCommit, List<String> endpoints, com.fasterxml.jackson.databind.JsonNode config, com.fasterxml.jackson.databind.JsonNode raw) extends Record
The Datadog Agent's GET /info document (fields this package reads).
  • Constructor Summary

    Constructors
    Constructor
    Description
    AgentInfo(String version, String gitCommit, List<String> endpoints, com.fasterxml.jackson.databind.JsonNode config, com.fasterxml.jackson.databind.JsonNode raw)
    Copies the endpoints.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JsonNode
    Returns the value of the config record component.
    Returns the value of the endpoints record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the gitCommit record component.
    final int
    Returns a hash code value for this object.
    com.fasterxml.jackson.databind.JsonNode
    raw()
    Returns the value of the raw record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the version record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AgentInfo

      public AgentInfo(String version, String gitCommit, List<String> endpoints, com.fasterxml.jackson.databind.JsonNode config, com.fasterxml.jackson.databind.JsonNode raw)
      Copies the endpoints.
      Parameters:
      version - version
      gitCommit - commit
      endpoints - endpoints
      config - config
      raw - document
  • 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.
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • gitCommit

      public String gitCommit()
      Returns the value of the gitCommit record component.
      Returns:
      the value of the gitCommit record component
    • endpoints

      public List<String> endpoints()
      Returns the value of the endpoints record component.
      Returns:
      the value of the endpoints record component
    • config

      public com.fasterxml.jackson.databind.JsonNode config()
      Returns the value of the config record component.
      Returns:
      the value of the config record component
    • raw

      public com.fasterxml.jackson.databind.JsonNode raw()
      Returns the value of the raw record component.
      Returns:
      the value of the raw record component