Interface Body


@Immutable public interface Body
This represents all the possible values for a log message body. A Body can currently only have 1 type of values: String, represented through Body.Type. This class will likely be extended in the future to include additional body types supported by the OpenTelemetry log data model.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    An enum that represents all the possible value types for an Body.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the String value of this Body.
    static Body
    Return an empty Body.
    Returns the type of the Body.
    static Body
    string(String stringValue)
    Returns an Body with a string value.
  • Method Details

    • string

      static Body string(String stringValue)
      Returns an Body with a string value.
      Parameters:
      stringValue - The new value.
      Returns:
      a Body with a string value.
    • empty

      static Body empty()
      Return an empty Body.
      Returns:
      a Body without a value.
    • asString

      String asString()
      Returns the String value of this Body.
    • getType

      Body.Type getType()
      Returns the type of the Body.