Class LogEntry (1.11.0)

publicfinalclass LogEntryextendsGeneratedMessageV3implementsLogEntryOrBuilder

An individual log entry.

Protobuf type google.api.servicecontrol.v1.LogEntry

Implements

LogEntryOrBuilder

Inherited Members

Static Fields

HTTP_REQUEST_FIELD_NUMBER

publicstaticfinalintHTTP_REQUEST_FIELD_NUMBER
Field Value
Type Description
int

INSERT_ID_FIELD_NUMBER

publicstaticfinalintINSERT_ID_FIELD_NUMBER
Field Value
Type Description
int

LABELS_FIELD_NUMBER

publicstaticfinalintLABELS_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
Type Description
int

OPERATION_FIELD_NUMBER

publicstaticfinalintOPERATION_FIELD_NUMBER
Field Value
Type Description
int

PROTO_PAYLOAD_FIELD_NUMBER

publicstaticfinalintPROTO_PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

SEVERITY_FIELD_NUMBER

publicstaticfinalintSEVERITY_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_LOCATION_FIELD_NUMBER

publicstaticfinalintSOURCE_LOCATION_FIELD_NUMBER
Field Value
Type Description
int

STRUCT_PAYLOAD_FIELD_NUMBER

publicstaticfinalintSTRUCT_PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

TEXT_PAYLOAD_FIELD_NUMBER

publicstaticfinalintTEXT_PAYLOAD_FIELD_NUMBER
Field Value
Type Description
int

TIMESTAMP_FIELD_NUMBER

publicstaticfinalintTIMESTAMP_FIELD_NUMBER
Field Value
Type Description
int

TRACE_FIELD_NUMBER

publicstaticfinalintTRACE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticLogEntrygetDefaultInstance()
Returns
Type Description

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticLogEntry.BuildernewBuilder()
Returns
Type Description

newBuilder(LogEntry prototype)

publicstaticLogEntry.BuildernewBuilder(LogEntryprototype)
Parameter
Name Description
prototype LogEntry
Returns
Type Description

parseDelimitedFrom(InputStream input)

publicstaticLogEntryparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticLogEntryparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data)

publicstaticLogEntryparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticLogEntryparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data)

publicstaticLogEntryparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticLogEntryparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input)

publicstaticLogEntryparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticLogEntryparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input)

publicstaticLogEntryparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticLogEntryparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data)

publicstaticLogEntryparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticLogEntryparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parser()

publicstaticParser<LogEntry>parser()
Returns
Type Description

Methods

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

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

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
Overrides

getDefaultInstanceForType()

publicLogEntrygetDefaultInstanceForType()
Returns
Type Description

getHttpRequest()

publicHttpRequestgetHttpRequest()

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()

publicHttpRequestOrBuildergetHttpRequestOrBuilder()

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

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

Returns
Type Description

getInsertId()

publicStringgetInsertId()

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()

publicByteStringgetInsertIdBytes()

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()

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description

getLabelsCount()

publicintgetLabelsCount()

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()

publicMap<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

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

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

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

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

getName()

publicStringgetName()

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

string name = 10;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

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()

publicLogEntryOperationgetOperation()

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()

publicLogEntryOperationOrBuildergetOperationOrBuilder()

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

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

Returns
Type Description

getParserForType()

publicParser<LogEntry>getParserForType()
Returns
Type Description
Overrides

getPayloadCase()

publicLogEntry.PayloadCasegetPayloadCase()
Returns
Type Description

getProtoPayload()

publicAnygetProtoPayload()

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()

publicAnyOrBuildergetProtoPayloadOrBuilder()

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

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getSeverity()

publicLogSeveritygetSeverity()

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()

publicintgetSeverityValue()

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()

publicLogEntrySourceLocationgetSourceLocation()

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()

publicLogEntrySourceLocationOrBuildergetSourceLocationOrBuilder()

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

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

Returns
Type Description

getStructPayload()

publicStructgetStructPayload()

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()

publicStructOrBuildergetStructPayloadOrBuilder()

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

.google.protobuf.Struct struct_payload = 6;

Returns
Type Description

getTextPayload()

publicStringgetTextPayload()

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

string text_payload = 3;

Returns
Type Description
String

The textPayload.

getTextPayloadBytes()

publicByteStringgetTextPayloadBytes()

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

string text_payload = 3;

Returns
Type Description
ByteString

The bytes for textPayload.

getTimestamp()

publicTimestampgetTimestamp()

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()

publicTimestampOrBuildergetTimestampOrBuilder()

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

getTrace()

publicStringgetTrace()

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()

publicByteStringgetTraceBytes()

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.

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
Overrides

hasHttpRequest()

publicbooleanhasHttpRequest()

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()

publicbooleanhasOperation()

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()

publicbooleanhasProtoPayload()

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()

publicbooleanhasSourceLocation()

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()

publicbooleanhasStructPayload()

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()

publicbooleanhasTextPayload()

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()

publicbooleanhasTimestamp()

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()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicLogEntry.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedLogEntry.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
Returns
Type Description
Overrides

toBuilder()

publicLogEntry.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.