Class LogEntry (1.54.0)

public final class LogEntry extends GeneratedMessageV3 implements LogEntryOrBuilder

An individual log entry.

Protobuf type google.api.servicecontrol.v1.LogEntry

Implements

LogEntryOrBuilder

Static Fields

HTTP_REQUEST_FIELD_NUMBER

public static final int HTTP_REQUEST_FIELD_NUMBER
Field Value
Type Description
int

INSERT_ID_FIELD_NUMBER

public static final int INSERT_ID_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

OPERATION_FIELD_NUMBER

public static final int OPERATION_FIELD_NUMBER
Field Value
Type Description
int

PROTO_PAYLOAD_FIELD_NUMBER

public static final int PROTO_PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_LOCATION_FIELD_NUMBER

public static final int SOURCE_LOCATION_FIELD_NUMBER
Field Value
Type Description
int

STRUCT_PAYLOAD_FIELD_NUMBER

public static final int STRUCT_PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

TEXT_PAYLOAD_FIELD_NUMBER

public static final int TEXT_PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

TIMESTAMP_FIELD_NUMBER

public static final int TIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

TRACE_FIELD_NUMBER

public static final int TRACE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static LogEntry getDefaultInstance()
Returns
Type Description
LogEntry

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static LogEntry.Builder newBuilder()
Returns
Type Description
LogEntry.Builder

newBuilder(LogEntry prototype)

public static LogEntry.Builder newBuilder(LogEntry prototype)
Parameter
Name Description
prototype LogEntry
Returns
Type Description
LogEntry.Builder

parseDelimitedFrom(InputStream input)

public static LogEntry parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
LogEntry
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogEntry
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static LogEntry parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
LogEntry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogEntry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LogEntry parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
LogEntry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogEntry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LogEntry parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
LogEntry
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogEntry
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static LogEntry parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
LogEntry
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogEntry
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static LogEntry parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
LogEntry
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LogEntry
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<LogEntry> parser()
Returns
Type Description
Parser<LogEntry>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

A set of user-defined (key, value) data that provides additional information about the log entry.

map<string, string> labels = 13;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public LogEntry getDefaultInstanceForType()
Returns
Type Description
LogEntry

getHttpRequest()

public HttpRequest getHttpRequest()

Optional. Information about the HTTP request associated with this log entry, if applicable.

.google.api.servicecontrol.v1.HttpRequest http_request = 14;

Returns
Type Description
HttpRequest

The httpRequest.

getHttpRequestOrBuilder()

public HttpRequestOrBuilder getHttpRequestOrBuilder()

Optional. Information about the HTTP request associated with this log entry, if applicable.

.google.api.servicecontrol.v1.HttpRequest http_request = 14;

Returns
Type Description
HttpRequestOrBuilder

getInsertId()

public String getInsertId()

A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.

string insert_id = 4;

Returns
Type Description
String

The insertId.

getInsertIdBytes()

public ByteString getInsertIdBytes()

A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.

string insert_id = 4;

Returns
Type Description
ByteString

The bytes for insertId.

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

A set of user-defined (key, value) data that provides additional information about the log entry.

map<string, string> labels = 13;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

A set of user-defined (key, value) data that provides additional information about the log entry.

map<string, string> labels = 13;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

A set of user-defined (key, value) data that provides additional information about the log entry.

map<string, string> labels = 13;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

A set of user-defined (key, value) data that provides additional information about the log entry.

map<string, string> labels = 13;

Parameter
Name Description
key String
Returns
Type Description
String

getName()

public String getName()

Required. The log to which this log entry belongs. Examples: "syslog", "book_log".

string name = 10;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. The log to which this log entry belongs. Examples: "syslog", "book_log".

string name = 10;

Returns
Type Description
ByteString

The bytes for name.

getOperation()

public LogEntryOperation getOperation()

Optional. Information about an operation associated with the log entry, if applicable.

.google.api.servicecontrol.v1.LogEntryOperation operation = 16;

Returns
Type Description
LogEntryOperation

The operation.

getOperationOrBuilder()

public LogEntryOperationOrBuilder getOperationOrBuilder()

Optional. Information about an operation associated with the log entry, if applicable.

.google.api.servicecontrol.v1.LogEntryOperation operation = 16;

Returns
Type Description
LogEntryOperationOrBuilder

getParserForType()

public Parser<LogEntry> getParserForType()
Returns
Type Description
Parser<LogEntry>
Overrides

getPayloadCase()

public LogEntry.PayloadCase getPayloadCase()
Returns
Type Description
LogEntry.PayloadCase

getProtoPayload()

public Any getProtoPayload()

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.

.google.protobuf.Any proto_payload = 2;

Returns
Type Description
Any

The protoPayload.

getProtoPayloadOrBuilder()

public AnyOrBuilder getProtoPayloadOrBuilder()

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.

.google.protobuf.Any proto_payload = 2;

Returns
Type Description
AnyOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSeverity()

public LogSeverity getSeverity()

The severity of the log entry. The default value is LogSeverity.DEFAULT.

.google.logging.type.LogSeverity severity = 12;

Returns
Type Description
com.google.logging.type.LogSeverity

The severity.

getSeverityValue()

public int getSeverityValue()

The severity of the log entry. The default value is LogSeverity.DEFAULT.

.google.logging.type.LogSeverity severity = 12;

Returns
Type Description
int

The enum numeric value on the wire for severity.

getSourceLocation()

public LogEntrySourceLocation getSourceLocation()

Optional. Source code location information associated with the log entry, if any.

.google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17;

Returns
Type Description
LogEntrySourceLocation

The sourceLocation.

getSourceLocationOrBuilder()

public LogEntrySourceLocationOrBuilder getSourceLocationOrBuilder()

Optional. Source code location information associated with the log entry, if any.

.google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17;

Returns
Type Description
LogEntrySourceLocationOrBuilder

getStructPayload()

public Struct getStructPayload()

The log entry payload, represented as a structure that is expressed as a JSON object.

.google.protobuf.Struct struct_payload = 6;

Returns
Type Description
Struct

The structPayload.

getStructPayloadOrBuilder()

public StructOrBuilder getStructPayloadOrBuilder()

The log entry payload, represented as a structure that is expressed as a JSON object.

.google.protobuf.Struct struct_payload = 6;

Returns
Type Description
StructOrBuilder

getTextPayload()

public String getTextPayload()

The log entry payload, represented as a Unicode string (UTF-8).

string text_payload = 3;

Returns
Type Description
String

The textPayload.

getTextPayloadBytes()

public ByteString getTextPayloadBytes()

The log entry payload, represented as a Unicode string (UTF-8).

string text_payload = 3;

Returns
Type Description
ByteString

The bytes for textPayload.

getTimestamp()

public Timestamp getTimestamp()

The time the event described by the log entry occurred. If omitted, defaults to operation start time.

.google.protobuf.Timestamp timestamp = 11;

Returns
Type Description
Timestamp

The timestamp.

getTimestampOrBuilder()

public TimestampOrBuilder getTimestampOrBuilder()

The time the event described by the log entry occurred. If omitted, defaults to operation start time.

.google.protobuf.Timestamp timestamp = 11;

Returns
Type Description
TimestampOrBuilder

getTrace()

public String getTrace()

Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824

string trace = 15;

Returns
Type Description
String

The trace.

getTraceBytes()

public ByteString getTraceBytes()

Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to //tracing.googleapis.com. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824

string trace = 15;

Returns
Type Description
ByteString

The bytes for trace.

hasHttpRequest()

public boolean hasHttpRequest()

Optional. Information about the HTTP request associated with this log entry, if applicable.

.google.api.servicecontrol.v1.HttpRequest http_request = 14;

Returns
Type Description
boolean

Whether the httpRequest field is set.

hasOperation()

public boolean hasOperation()

Optional. Information about an operation associated with the log entry, if applicable.

.google.api.servicecontrol.v1.LogEntryOperation operation = 16;

Returns
Type Description
boolean

Whether the operation field is set.

hasProtoPayload()

public boolean hasProtoPayload()

The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.

.google.protobuf.Any proto_payload = 2;

Returns
Type Description
boolean

Whether the protoPayload field is set.

hasSourceLocation()

public boolean hasSourceLocation()

Optional. Source code location information associated with the log entry, if any.

.google.api.servicecontrol.v1.LogEntrySourceLocation source_location = 17;

Returns
Type Description
boolean

Whether the sourceLocation field is set.

hasStructPayload()

public boolean hasStructPayload()

The log entry payload, represented as a structure that is expressed as a JSON object.

.google.protobuf.Struct struct_payload = 6;

Returns
Type Description
boolean

Whether the structPayload field is set.

hasTextPayload()

public boolean hasTextPayload()

The log entry payload, represented as a Unicode string (UTF-8).

string text_payload = 3;

Returns
Type Description
boolean

Whether the textPayload field is set.

hasTimestamp()

public boolean hasTimestamp()

The time the event described by the log entry occurred. If omitted, defaults to operation start time.

.google.protobuf.Timestamp timestamp = 11;

Returns
Type Description
boolean

Whether the timestamp field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public LogEntry.Builder newBuilderForType()
Returns
Type Description
LogEntry.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LogEntry.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
LogEntry.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public LogEntry.Builder toBuilder()
Returns
Type Description
LogEntry.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException