# Interface LogEntryDataOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogEntryDataOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.audit.v1.LogEntryDataOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.audit.v1.LogEntryDataOrBuilder)

    public interface LogEntryDataOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

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

`map<string, string> labels = 11;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getInsertId()

    public abstract String getInsertId()

A unique identifier for the log entry.

`string insert_id = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The insertId. |

### getInsertIdBytes()

    public abstract ByteString getInsertIdBytes()

A unique identifier for the log entry.

`string insert_id = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for insertId. |

### getLabels()

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogEntryDataOrBuilder#com_google_events_cloud_audit_v1_LogEntryDataOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

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

`map<string, string> labels = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

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

`map<string, string> labels = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract 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 = 11;`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

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

`map<string, string> labels = 11;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLogName()

    public abstract String getLogName()

The resource name of the log to which this log entry belongs.

`string log_name = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The logName. |

### getLogNameBytes()

    public abstract ByteString getLogNameBytes()

The resource name of the log to which this log entry belongs.

`string log_name = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for logName. |

### getOperation()

    public abstract LogEntryOperation getOperation()

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

`.google.events.cloud.audit.v1.LogEntryOperation operation = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogEntryOperation` | The operation. |

### getOperationOrBuilder()

    public abstract LogEntryOperationOrBuilder getOperationOrBuilder()

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

`.google.events.cloud.audit.v1.LogEntryOperation operation = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogEntryOperationOrBuilder` |   |

### getProtoPayload()

    public abstract AuditLog getProtoPayload()

The log entry payload, which is always an AuditLog for Cloud Audit Log
events.

`.google.events.cloud.audit.v1.AuditLog proto_payload = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.AuditLog` | The protoPayload. |

### getProtoPayloadOrBuilder()

    public abstract AuditLogOrBuilder getProtoPayloadOrBuilder()

The log entry payload, which is always an AuditLog for Cloud Audit Log
events.

`.google.events.cloud.audit.v1.AuditLog proto_payload = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.AuditLogOrBuilder` |   |

### getReceiveTimestamp()

    public abstract Timestamp getReceiveTimestamp()

The time the log entry was received by Logging.

`.google.protobuf.Timestamp receive_timestamp = 24;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The receiveTimestamp. |

### getReceiveTimestampOrBuilder()

    public abstract TimestampOrBuilder getReceiveTimestampOrBuilder()

The time the log entry was received by Logging.

`.google.protobuf.Timestamp receive_timestamp = 24;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getResource()

    public abstract MonitoredResource getResource()

The monitored resource that produced this log entry.
Example: a log entry that reports a database error would be associated with
the monitored resource designating the particular database that reported
the error.

`.google.api.MonitoredResource resource = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.api.MonitoredResource` | The resource. |

### getResourceOrBuilder()

    public abstract MonitoredResourceOrBuilder getResourceOrBuilder()

The monitored resource that produced this log entry.
Example: a log entry that reports a database error would be associated with
the monitored resource designating the particular database that reported
the error.

`.google.api.MonitoredResource resource = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.api.MonitoredResourceOrBuilder` |   |

### getSeverity()

    public abstract LogSeverity getSeverity()

The severity of the log entry.

`.google.events.cloud.audit.v1.LogSeverity severity = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogSeverity` | The severity. |

### getSeverityValue()

    public abstract int getSeverityValue()

The severity of the log entry.

`.google.events.cloud.audit.v1.LogSeverity severity = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for severity. |

### getSpanId()

    public abstract String getSpanId()

The span ID within the trace associated with the log entry, if any.
For Trace spans, this is the same format that the Trace API v2 uses: a
16-character hexadecimal encoding of an 8-byte array, such as
`000000000000004a`.

`string span_id = 27;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The spanId. |

### getSpanIdBytes()

    public abstract ByteString getSpanIdBytes()

The span ID within the trace associated with the log entry, if any.
For Trace spans, this is the same format that the Trace API v2 uses: a
16-character hexadecimal encoding of an 8-byte array, such as
`000000000000004a`.

`string span_id = 27;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for spanId. |

### getSplit()

    public abstract LogSplit getSplit()

Information indicating this LogEntry is part of a sequence of multiple logs
split from a single LogEntry.

`.google.events.cloud.audit.v1.LogSplit split = 35;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogSplit` | The split. |

### getSplitOrBuilder()

    public abstract LogSplitOrBuilder getSplitOrBuilder()

Information indicating this LogEntry is part of a sequence of multiple logs
split from a single LogEntry.

`.google.events.cloud.audit.v1.LogSplit split = 35;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.audit.v1.LogSplitOrBuilder` |   |

### getTimestamp()

    public abstract Timestamp getTimestamp()

The time the event described by the log entry occurred.

`.google.protobuf.Timestamp timestamp = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The timestamp. |

### getTimestampOrBuilder()

    public abstract TimestampOrBuilder getTimestampOrBuilder()

The time the event described by the log entry occurred.

`.google.protobuf.Timestamp timestamp = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getTrace()

    public abstract String getTrace()

Resource name of the trace associated with the log entry, if any. If it
contains a relative resource name, the name is assumed to be relative to
`//tracing.googleapis.com`. Example:
`projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`

`string trace = 22;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The trace. |

### getTraceBytes()

    public abstract ByteString getTraceBytes()

Resource name of the trace associated with the log entry, if any. If it
contains a relative resource name, the name is assumed to be relative to
`//tracing.googleapis.com`. Example:
`projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`

`string trace = 22;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for trace. |

### hasOperation()

    public abstract boolean hasOperation()

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

`.google.events.cloud.audit.v1.LogEntryOperation operation = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the operation field is set. |

### hasProtoPayload()

    public abstract boolean hasProtoPayload()

The log entry payload, which is always an AuditLog for Cloud Audit Log
events.

`.google.events.cloud.audit.v1.AuditLog proto_payload = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the protoPayload field is set. |

### hasReceiveTimestamp()

    public abstract boolean hasReceiveTimestamp()

The time the log entry was received by Logging.

`.google.protobuf.Timestamp receive_timestamp = 24;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the receiveTimestamp field is set. |

### hasResource()

    public abstract boolean hasResource()

The monitored resource that produced this log entry.
Example: a log entry that reports a database error would be associated with
the monitored resource designating the particular database that reported
the error.

`.google.api.MonitoredResource resource = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the resource field is set. |

### hasSplit()

    public abstract boolean hasSplit()

Information indicating this LogEntry is part of a sequence of multiple logs
split from a single LogEntry.

`.google.events.cloud.audit.v1.LogSplit split = 35;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the split field is set. |

### hasTimestamp()

    public abstract boolean hasTimestamp()

The time the event described by the log entry occurred.

`.google.protobuf.Timestamp timestamp = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the timestamp field is set. |