Package com.google.cloud.logging
Class Payload<T>
- java.lang.Object
-
- com.google.cloud.logging.Payload<T>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Payload.JsonPayload
,Payload.ProtoPayload
,Payload.StringPayload
public abstract class Payload<T> extends Object implements Serializable
A base class for log entry payloads.- See Also:
- Log Entries and Logs, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Payload.JsonPayload
A log entry's JSON payload.static class
Payload.ProtoPayload
A log entry payload as a protobuf object.static class
Payload.StringPayload
A log entry payload as an UTF-8 string.static class
Payload.Type
Type for a log entry payload.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
T
getData()
Returns the log entry payload's data.Payload.Type
getType()
Returns the payload type.int
hashCode()
String
toString()
-
-
-
Method Detail
-
getType
public Payload.Type getType()
Returns the payload type. Payload can be an UTF-8 string (Payload.Type.STRING
), a JSON object (Payload.Type.JSON
) or a protobuf object (Payload.Type.PROTO
).
-
getData
public T getData()
Returns the log entry payload's data.
-
-