public final class LogEntry
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Logging API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags
Constructor and Description |
---|
LogEntry() |
Modifier and Type | Method and Description |
---|---|
LogEntry |
clone() |
HttpRequest |
getHttpRequest()
Optional.
|
java.lang.String |
getInsertId()
Optional.
|
java.util.Map<java.lang.String,java.lang.Object> |
getJsonPayload()
The log entry payload, represented as a structure that is expressed as a JSON object.
|
java.util.Map<java.lang.String,java.lang.String> |
getLabels()
Optional.
|
java.lang.String |
getLogName()
Required.
|
MonitoredResourceMetadata |
getMetadata()
Output only.
|
LogEntryOperation |
getOperation()
Optional.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProtoPayload()
The log entry payload, represented as a protocol buffer.
|
java.lang.String |
getReceiveTimestamp()
Output only.
|
MonitoredResource |
getResource()
Required.
|
java.lang.String |
getSeverity()
Optional.
|
LogEntrySourceLocation |
getSourceLocation()
Optional.
|
java.lang.String |
getSpanId()
Optional.
|
java.lang.String |
getTextPayload()
The log entry payload, represented as a Unicode string (UTF-8).
|
java.lang.String |
getTimestamp()
Optional.
|
java.lang.String |
getTrace()
Optional.
|
java.lang.Boolean |
getTraceSampled()
Optional.
|
LogEntry |
set(java.lang.String fieldName,
java.lang.Object value) |
LogEntry |
setHttpRequest(HttpRequest httpRequest)
Optional.
|
LogEntry |
setInsertId(java.lang.String insertId)
Optional.
|
LogEntry |
setJsonPayload(java.util.Map<java.lang.String,java.lang.Object> jsonPayload)
The log entry payload, represented as a structure that is expressed as a JSON object.
|
LogEntry |
setLabels(java.util.Map<java.lang.String,java.lang.String> labels)
Optional.
|
LogEntry |
setLogName(java.lang.String logName)
Required.
|
LogEntry |
setMetadata(MonitoredResourceMetadata metadata)
Output only.
|
LogEntry |
setOperation(LogEntryOperation operation)
Optional.
|
LogEntry |
setProtoPayload(java.util.Map<java.lang.String,java.lang.Object> protoPayload)
The log entry payload, represented as a protocol buffer.
|
LogEntry |
setReceiveTimestamp(java.lang.String receiveTimestamp)
Output only.
|
LogEntry |
setResource(MonitoredResource resource)
Required.
|
LogEntry |
setSeverity(java.lang.String severity)
Optional.
|
LogEntry |
setSourceLocation(LogEntrySourceLocation sourceLocation)
Optional.
|
LogEntry |
setSpanId(java.lang.String spanId)
Optional.
|
LogEntry |
setTextPayload(java.lang.String textPayload)
The log entry payload, represented as a Unicode string (UTF-8).
|
LogEntry |
setTimestamp(java.lang.String timestamp)
Optional.
|
LogEntry |
setTrace(java.lang.String trace)
Optional.
|
LogEntry |
setTraceSampled(java.lang.Boolean traceSampled)
Optional.
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
public HttpRequest getHttpRequest()
null
for nonepublic LogEntry setHttpRequest(HttpRequest httpRequest)
httpRequest
- httpRequest or null
for nonepublic java.lang.String getInsertId()
null
for nonepublic LogEntry setInsertId(java.lang.String insertId)
insertId
- insertId or null
for nonepublic java.util.Map<java.lang.String,java.lang.Object> getJsonPayload()
null
for nonepublic LogEntry setJsonPayload(java.util.Map<java.lang.String,java.lang.Object> jsonPayload)
jsonPayload
- jsonPayload or null
for nonepublic java.util.Map<java.lang.String,java.lang.String> getLabels()
null
for nonepublic LogEntry setLabels(java.util.Map<java.lang.String,java.lang.String> labels)
labels
- labels or null
for nonepublic java.lang.String getLogName()
null
for nonepublic LogEntry setLogName(java.lang.String logName)
logName
- logName or null
for nonepublic MonitoredResourceMetadata getMetadata()
null
for nonepublic LogEntry setMetadata(MonitoredResourceMetadata metadata)
metadata
- metadata or null
for nonepublic LogEntryOperation getOperation()
null
for nonepublic LogEntry setOperation(LogEntryOperation operation)
operation
- operation or null
for nonepublic java.util.Map<java.lang.String,java.lang.Object> getProtoPayload()
null
for nonepublic LogEntry setProtoPayload(java.util.Map<java.lang.String,java.lang.Object> protoPayload)
protoPayload
- protoPayload or null
for nonepublic java.lang.String getReceiveTimestamp()
null
for nonepublic LogEntry setReceiveTimestamp(java.lang.String receiveTimestamp)
receiveTimestamp
- receiveTimestamp or null
for nonepublic MonitoredResource getResource()
null
for nonepublic LogEntry setResource(MonitoredResource resource)
resource
- resource or null
for nonepublic java.lang.String getSeverity()
null
for nonepublic LogEntry setSeverity(java.lang.String severity)
severity
- severity or null
for nonepublic LogEntrySourceLocation getSourceLocation()
null
for nonepublic LogEntry setSourceLocation(LogEntrySourceLocation sourceLocation)
sourceLocation
- sourceLocation or null
for nonepublic java.lang.String getSpanId()
null
for nonepublic LogEntry setSpanId(java.lang.String spanId)
spanId
- spanId or null
for nonepublic java.lang.String getTextPayload()
null
for nonepublic LogEntry setTextPayload(java.lang.String textPayload)
textPayload
- textPayload or null
for nonepublic java.lang.String getTimestamp()
null
for nonepublic LogEntry setTimestamp(java.lang.String timestamp)
timestamp
- timestamp or null
for nonepublic java.lang.String getTrace()
null
for nonepublic LogEntry setTrace(java.lang.String trace)
trace
- trace or null
for nonepublic java.lang.Boolean getTraceSampled()
null
for nonepublic LogEntry setTraceSampled(java.lang.Boolean traceSampled)
traceSampled
- traceSampled or null
for nonepublic LogEntry set(java.lang.String fieldName, java.lang.Object value)
set
in class com.google.api.client.json.GenericJson
public LogEntry clone()
clone
in class com.google.api.client.json.GenericJson