Enum EmptyBody

java.lang.Object
java.lang.Enum<EmptyBody>
io.opentelemetry.sdk.logs.data.EmptyBody
All Implemented Interfaces:
Body, Serializable, Comparable<EmptyBody>, java.lang.constant.Constable

enum EmptyBody extends Enum<EmptyBody> implements Body
  • Enum Constant Details

    • INSTANCE

      public static final EmptyBody INSTANCE
  • Constructor Details

    • EmptyBody

      private EmptyBody()
  • Method Details

    • values

      public static EmptyBody[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EmptyBody valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • asString

      public String asString()
      Description copied from interface: Body
      Returns the String value of this Body.

      If the log record body is some ValueType other than ValueType.STRING, this returns Value.asString(). Consumers should use LogRecordData.getBodyValue() instead.

      Specified by:
      asString in interface Body
    • getType

      public Body.Type getType()
      Description copied from interface: Body
      Returns the type of the Body.
      Specified by:
      getType in interface Body