Class LogEntry (1.29.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
TypeDescription
int

INSERT_ID_FIELD_NUMBER

public static final int INSERT_ID_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

OPERATION_FIELD_NUMBER

public static final int OPERATION_FIELD_NUMBER
Field Value
TypeDescription
int

PROTO_PAYLOAD_FIELD_NUMBER

public static final int PROTO_PAYLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

SEVERITY_FIELD_NUMBER

public static final int SEVERITY_FIELD_NUMBER
Field Value
TypeDescription
int

SOURCE_LOCATION_FIELD_NUMBER

public static final int SOURCE_LOCATION_FIELD_NUMBER
Field Value
TypeDescription
int

STRUCT_PAYLOAD_FIELD_NUMBER

public static final int STRUCT_PAYLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_PAYLOAD_FIELD_NUMBER

public static final int TEXT_PAYLOAD_FIELD_NUMBER
Field Value
TypeDescription
int

TIMESTAMP_FIELD_NUMBER

public static final int TIMESTAMP_FIELD_NUMBER
Field Value
TypeDescription
int

TRACE_FIELD_NUMBER

public static final int TRACE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static LogEntry getDefaultInstance()
Returns
TypeDescription
LogEntry

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static LogEntry.Builder newBuilder()
Returns
TypeDescription
LogEntry.Builder

newBuilder(LogEntry prototype)

public static LogEntry.Builder newBuilder(LogEntry prototype)
Parameter
NameDescription
prototypeLogEntry
Returns
TypeDescription
LogEntry.Builder

parseDelimitedFrom(InputStream input)

public static LogEntry parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static LogEntry parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static LogEntry parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static LogEntry parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static LogEntry parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static LogEntry parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static LogEntry parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
LogEntry
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<LogEntry> parser()
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public LogEntry getDefaultInstanceForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for insertId.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
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
NameDescription
keyString
Returns
TypeDescription
String

getName()

public String getName()

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

string name = 10;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

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

string name = 10;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
LogEntryOperationOrBuilder

getParserForType()

public Parser<LogEntry> getParserForType()
Returns
TypeDescription
Parser<LogEntry>
Overrides

getPayloadCase()

public LogEntry.PayloadCase getPayloadCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
AnyOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
StructOrBuilder

getTextPayload()

public String getTextPayload()

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

string text_payload = 3;

Returns
TypeDescription
String

The textPayload.

getTextPayloadBytes()

public ByteString getTextPayloadBytes()

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

string text_payload = 3;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the timestamp field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public LogEntry.Builder newBuilderForType()
Returns
TypeDescription
LogEntry.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected LogEntry.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
LogEntry.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public LogEntry.Builder toBuilder()
Returns
TypeDescription
LogEntry.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException