# Class WriteLogEntriesRequest.Builder (3.34.0)

3.34.0 (latest) 3.32.0 3.29.0 3.28.0 3.26.0 3.24.0 3.23.10 3.22.6 3.21.4 3.20.7 3.19.0 3.18.0 3.17.2 3.16.2 3.15.17 3.14.9 3.13.7 3.12.1 3.11.10 3.10.7 3.9.0 3.8.0 3.7.6 3.6.4 3.5.3

    public static final class WriteLogEntriesRequest.Builder extends GeneratedMessage.Builder<WriteLogEntriesRequest.Builder> implements WriteLogEntriesRequestOrBuilder

The parameters to WriteLogEntries.

Protobuf type `google.logging.v2.WriteLogEntriesRequest`

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractMessageLite.Builder\<MessageType,BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html) \> [AbstractMessage.Builder\<BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html) \> [GeneratedMessage.Builder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html) \> WriteLogEntriesRequest.Builder

## Implements

[WriteLogEntriesRequestOrBuilder](https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequestOrBuilder)

## Inherited Members

[AbstractMessage.Builder.findInitializationErrors()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_findInitializationErrors__) [AbstractMessage.Builder.getInitializationErrorString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_getInitializationErrorString__) [AbstractMessage.Builder.internalMergeFrom(AbstractMessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_internalMergeFrom_com_google_protobuf_AbstractMessageLite_) [AbstractMessage.Builder.mergeFrom(byte\[\])](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___) [AbstractMessage.Builder.mergeFrom(byte\[\],ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(byte\[\],int,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___int_int_) [AbstractMessage.Builder.mergeFrom(byte\[\],int,int,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_byte___int_int_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(ByteString)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_ByteString_) [AbstractMessage.Builder.mergeFrom(ByteString,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_ByteString_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(CodedInputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_) [AbstractMessage.Builder.mergeFrom(CodedInputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.mergeFrom(Message)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_Message_) [AbstractMessage.Builder.mergeFrom(InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_java_io_InputStream_) [AbstractMessage.Builder.mergeFrom(InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessage.Builder.newUninitializedMessageException(Message)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_newUninitializedMessageException_com_google_protobuf_Message_) [AbstractMessage.Builder.toString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_toString__) [AbstractMessageLite.Builder.\<T\>addAll(Iterable\<T\>,Collection\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder__T_addAll_java_lang_Iterable_T__java_util_Collection___super_T__) [AbstractMessageLite.Builder.\<T\>addAll(Iterable\<T\>,List\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder__T_addAll_java_lang_Iterable_T__java_util_List___super_T__) [AbstractMessageLite.Builder.internalMergeFrom(MessageType)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_internalMergeFrom_MessageType_) [AbstractMessageLite.Builder.mergeDelimitedFrom(InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeDelimitedFrom_java_io_InputStream_) [AbstractMessageLite.Builder.mergeDelimitedFrom(InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeDelimitedFrom_java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [AbstractMessageLite.Builder.mergeFrom(MessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_mergeFrom_com_google_protobuf_MessageLite_) [AbstractMessageLite.Builder.newUninitializedMessageException(MessageLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.Builder.html#com_google_protobuf_AbstractMessageLite_Builder_newUninitializedMessageException_com_google_protobuf_MessageLite_) [GeneratedMessage.Builder.addRepeatedField(Descriptors.FieldDescriptor,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_addRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object_) [GeneratedMessage.Builder.clear()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clear__) [GeneratedMessage.Builder.clearField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clearField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.clearOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clearOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.clone()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clone__) [GeneratedMessage.Builder.getAllFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getAllFields__) [GeneratedMessage.Builder.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getDescriptorForType__) [GeneratedMessage.Builder.getField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.getFieldBuilder(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getFieldBuilder_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.getOneofFieldDescriptor(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getOneofFieldDescriptor_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.getParentForChildren()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getParentForChildren__) [GeneratedMessage.Builder.getRepeatedField(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.Builder.getRepeatedFieldBuilder(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedFieldBuilder_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.Builder.getRepeatedFieldCount(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getRepeatedFieldCount_com_google_protobuf_Descriptors_FieldDescriptor_) com.google.protobuf.GeneratedMessage.Builder.getUnknownFieldSetBuilder() [GeneratedMessage.Builder.getUnknownFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getUnknownFields__) [GeneratedMessage.Builder.hasField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_hasField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.hasOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_hasOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.Builder.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetFieldAccessorTable__) [GeneratedMessage.Builder.internalGetMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetMapField_int_) com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int) [GeneratedMessage.Builder.internalGetMutableMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetMutableMapField_int_) com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int) [GeneratedMessage.Builder.isClean()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isClean__) [GeneratedMessage.Builder.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isInitialized__) [GeneratedMessage.Builder.markClean()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_markClean__) [GeneratedMessage.Builder.mergeUnknownFields(UnknownFieldSet)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_mergeUnknownFields_com_google_protobuf_UnknownFieldSet_) com.google.protobuf.GeneratedMessage.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString) com.google.protobuf.GeneratedMessage.Builder.mergeUnknownVarintField(int,int) [GeneratedMessage.Builder.newBuilderForField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_newBuilderForField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.Builder.onBuilt()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_onBuilt__) [GeneratedMessage.Builder.onChanged()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_onChanged__) com.google.protobuf.GeneratedMessage.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int) [GeneratedMessage.Builder.setField(Descriptors.FieldDescriptor,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setField_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object_) [GeneratedMessage.Builder.setRepeatedField(Descriptors.FieldDescriptor,int,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_java_lang_Object_) com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder) [GeneratedMessage.Builder.setUnknownFields(UnknownFieldSet)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_setUnknownFields_com_google_protobuf_UnknownFieldSet_) com.google.protobuf.GeneratedMessage.Builder.setUnknownFieldsProto3(com.google.protobuf.UnknownFieldSet) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### getDescriptor()

    public static final Descriptors.Descriptor getDescriptor()

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

## Methods

### addAllEntries(Iterable\<? extends LogEntry\> values)

    public WriteLogEntriesRequest.Builder addAllEntries(Iterable<? extends LogEntry> values)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html<? extends com.google.logging.v2.LogEntry>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### addEntries(LogEntry value)

    public WriteLogEntriesRequest.Builder addEntries(LogEntry value)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### addEntries(LogEntry.Builder builderForValue)

    public WriteLogEntriesRequest.Builder addEntries(LogEntry.Builder builderForValue)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### addEntries(int index, LogEntry value)

    public WriteLogEntriesRequest.Builder addEntries(int index, LogEntry value)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### addEntries(int index, LogEntry.Builder builderForValue)

    public WriteLogEntriesRequest.Builder addEntries(int index, LogEntry.Builder builderForValue)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### addEntriesBuilder()

    public LogEntry.Builder addEntriesBuilder()

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder` |   |

### addEntriesBuilder(int index)

    public LogEntry.Builder addEntriesBuilder(int index)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder` |   |

### build()

    public WriteLogEntriesRequest build()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest` |   |

### buildPartial()

    public WriteLogEntriesRequest buildPartial()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest` |   |

### clear()

    public WriteLogEntriesRequest.Builder clear()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.clear()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_clear__)

### clearDryRun()

    public WriteLogEntriesRequest.Builder clearDryRun()

Optional. If true, the request should expect normal response, but the
entries won't be persisted nor exported. Useful for checking whether the
logging API endpoints are working properly before sending valuable data.

`bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### clearEntries()

    public WriteLogEntriesRequest.Builder clearEntries()

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### clearLabels()

    public WriteLogEntriesRequest.Builder clearLabels()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### clearLogName()

    public WriteLogEntriesRequest.Builder clearLogName()

Optional. A default log resource name that is assigned to all log entries
in `entries` that do not specify a value for `log_name`:

- `projects/[PROJECT_ID]/logs/[LOG_ID]`
- `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
- `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
- `folders/[FOLDER_ID]/logs/[LOG_ID]`

  `[LOG_ID]` must be URL-encoded. For example:

  "projects/my-project-id/logs/syslog"
  "organizations/123/logs/cloudaudit.googleapis.com%2Factivity"

  The permission `logging.logEntries.create` is needed on each project,
  organization, billing account, or folder that is receiving new log
  entries, whether the resource is specified in `logName` or in an
  individual log entry.

`
string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### clearPartialSuccess()

    public WriteLogEntriesRequest.Builder clearPartialSuccess()

Optional. Whether a batch's valid entries should be written even if some
other entry failed due to a permanent error such as INVALID_ARGUMENT or
PERMISSION_DENIED. If any entry failed, then the response status is the
response status of one of the failed entries. The response will include
error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by
the entries' zero-based index in the `entries`. Failed requests for which
no entries are written will not include per-entry errors.

`bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### clearResource()

    public WriteLogEntriesRequest.Builder clearResource()

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### containsLabels(String key)

    public boolean containsLabels(String key)

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **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` |   |

### getDefaultInstanceForType()

    public WriteLogEntriesRequest getDefaultInstanceForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest` |   |

### getDescriptorForType()

    public Descriptors.Descriptor getDescriptorForType()

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

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_getDescriptorForType__)

### getDryRun()

    public boolean getDryRun()

Optional. If true, the request should expect normal response, but the
entries won't be persisted nor exported. Useful for checking whether the
logging API endpoints are working properly before sending valuable data.

`bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL];`

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

### getEntries(int index)

    public LogEntry getEntries(int index)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry` |   |

### getEntriesBuilder(int index)

    public LogEntry.Builder getEntriesBuilder(int index)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder` |   |

### getEntriesBuilderList()

    public List<LogEntry.Builder> getEntriesBuilderList()

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder>` |   |

### getEntriesCount()

    public int getEntriesCount()

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

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

### getEntriesList()

    public List<LogEntry> getEntriesList()

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry>` |   |

### getEntriesOrBuilder(int index)

    public LogEntryOrBuilder getEntriesOrBuilder(int index)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntryOrBuilder` |   |

### getEntriesOrBuilderList()

    public List<? extends LogEntryOrBuilder> getEntriesOrBuilderList()

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.logging.v2.LogEntryOrBuilder>` |   |

### getLabels() (deprecated)

    public Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder#com_google_logging_v2_WriteLogEntriesRequest_Builder_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 int getLabelsCount()

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

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

### getLabelsMap()

    public Map<String,String> getLabelsMap()

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **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 String getLabelsOrDefault(String key, String defaultValue)

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **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 String getLabelsOrThrow(String key)

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **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 String getLogName()

Optional. A default log resource name that is assigned to all log entries
in `entries` that do not specify a value for `log_name`:

- `projects/[PROJECT_ID]/logs/[LOG_ID]`
- `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
- `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
- `folders/[FOLDER_ID]/logs/[LOG_ID]`

  `[LOG_ID]` must be URL-encoded. For example:

  "projects/my-project-id/logs/syslog"
  "organizations/123/logs/cloudaudit.googleapis.com%2Factivity"

  The permission `logging.logEntries.create` is needed on each project,
  organization, billing account, or folder that is receiving new log
  entries, whether the resource is specified in `logName` or in an
  individual log entry.

`
string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

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

### getLogNameBytes()

    public ByteString getLogNameBytes()

Optional. A default log resource name that is assigned to all log entries
in `entries` that do not specify a value for `log_name`:

- `projects/[PROJECT_ID]/logs/[LOG_ID]`
- `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
- `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
- `folders/[FOLDER_ID]/logs/[LOG_ID]`

  `[LOG_ID]` must be URL-encoded. For example:

  "projects/my-project-id/logs/syslog"
  "organizations/123/logs/cloudaudit.googleapis.com%2Factivity"

  The permission `logging.logEntries.create` is needed on each project,
  organization, billing account, or folder that is receiving new log
  entries, whether the resource is specified in `logName` or in an
  individual log entry.

`
string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

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

### getMutableLabels() (deprecated)

    public Map<String,String> getMutableLabels()

Use alternate mutation accessors 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>` |   |

### getPartialSuccess()

    public boolean getPartialSuccess()

Optional. Whether a batch's valid entries should be written even if some
other entry failed due to a permanent error such as INVALID_ARGUMENT or
PERMISSION_DENIED. If any entry failed, then the response status is the
response status of one of the failed entries. The response will include
error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by
the entries' zero-based index in the `entries`. Failed requests for which
no entries are written will not include per-entry errors.

`bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL];`

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

### getResource()

    public MonitoredResource getResource()

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getResourceBuilder()

    public MonitoredResource.Builder getResourceBuilder()

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getResourceOrBuilder()

    public MonitoredResourceOrBuilder getResourceOrBuilder()

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

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

### hasResource()

    public boolean hasResource()

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

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

### internalGetFieldAccessorTable()

    protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

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

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_internalGetFieldAccessorTable__)

### internalGetMapFieldReflection(int number)

    protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `number` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.protobuf.MapFieldReflectionAccessor` |   |

**Overrides** com.google.protobuf.GeneratedMessage.Builder.internalGetMapFieldReflection(int)

### internalGetMutableMapFieldReflection(int number)

    protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `number` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.protobuf.MapFieldReflectionAccessor` |   |

**Overrides** com.google.protobuf.GeneratedMessage.Builder.internalGetMutableMapFieldReflection(int)

### isInitialized()

    public final boolean isInitialized()

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

**Overrides** [GeneratedMessage.Builder\<BuilderType\>.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.Builder.html#com_google_protobuf_GeneratedMessage_Builder_isInitialized__)

### mergeFrom(WriteLogEntriesRequest other)

    public WriteLogEntriesRequest.Builder mergeFrom(WriteLogEntriesRequest other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public WriteLogEntriesRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

**Overrides** [AbstractMessage.Builder\<BuilderType\>.mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### mergeFrom(Message other)

    public WriteLogEntriesRequest.Builder mergeFrom(Message other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Message.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

**Overrides** [AbstractMessage.Builder\<BuilderType\>.mergeFrom(Message other)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.Builder.html#com_google_protobuf_AbstractMessage_Builder_mergeFrom_com_google_protobuf_Message_)

### mergeResource(MonitoredResource value)

    public WriteLogEntriesRequest.Builder mergeResource(MonitoredResource value)

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `com.google.api.MonitoredResource` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### putAllLabels(Map\<String,String\> values)

    public WriteLogEntriesRequest.Builder putAllLabels(Map<String,String> values)

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `values` | `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>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### putLabels(String key, String value)

    public WriteLogEntriesRequest.Builder putLabels(String key, String value)

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### removeEntries(int index)

    public WriteLogEntriesRequest.Builder removeEntries(int index)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### removeLabels(String key)

    public WriteLogEntriesRequest.Builder removeLabels(String key)

Optional. Default labels that are added to the `labels` field of all log
entries in `entries`. If a log entry already has a label with the same key
as a label in this parameter, then the log entry's label is not changed.
See LogEntry.

`map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL];`

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### setDryRun(boolean value)

    public WriteLogEntriesRequest.Builder setDryRun(boolean value)

Optional. If true, the request should expect normal response, but the
entries won't be persisted nor exported. Useful for checking whether the
logging API endpoints are working properly before sending valuable data.

`bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The dryRun to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### setEntries(int index, LogEntry value)

    public WriteLogEntriesRequest.Builder setEntries(int index, LogEntry value)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `value` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### setEntries(int index, LogEntry.Builder builderForValue)

    public WriteLogEntriesRequest.Builder setEntries(int index, LogEntry.Builder builderForValue)

Required. The log entries to send to Logging. The order of log
entries in this list does not matter. Values supplied in this method's
`log_name`, `resource`, and `labels` fields are copied into those log
entries in this list that do not include values for their corresponding
fields. For more information, see the
LogEntry type.

If the `timestamp` or `insert_id` fields are missing in log entries, then
this method supplies the current time or a unique identifier, respectively.
The supplied values are chosen so that, among the log entries that did not
supply their own values, the entries earlier in the list will sort before
the entries later in the list. See the `entries.list` method.

Log entries with timestamps that are more than the
[logs retention period](https://cloud.google.com/logging/quotas) in
the past or more than 24 hours in the future will not be available when
calling `entries.list`. However, those log entries can still be [exported
with
LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs).

To improve throughput and to avoid exceeding the
[quota limit](https://cloud.google.com/logging/quotas) for calls to
`entries.write`, you should try to include several log entries in this
list, rather than calling this method for each individual log entry.

`
repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED];
`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `builderForValue` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.LogEntry.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### setLogName(String value)

    public WriteLogEntriesRequest.Builder setLogName(String value)

Optional. A default log resource name that is assigned to all log entries
in `entries` that do not specify a value for `log_name`:

- `projects/[PROJECT_ID]/logs/[LOG_ID]`
- `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
- `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
- `folders/[FOLDER_ID]/logs/[LOG_ID]`

  `[LOG_ID]` must be URL-encoded. For example:

  "projects/my-project-id/logs/syslog"
  "organizations/123/logs/cloudaudit.googleapis.com%2Factivity"

  The permission `logging.logEntries.create` is needed on each project,
  organization, billing account, or folder that is receiving new log
  entries, whether the resource is specified in `logName` or in an
  individual log entry.

`
string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` The logName to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### setLogNameBytes(ByteString value)

    public WriteLogEntriesRequest.Builder setLogNameBytes(ByteString value)

Optional. A default log resource name that is assigned to all log entries
in `entries` that do not specify a value for `log_name`:

- `projects/[PROJECT_ID]/logs/[LOG_ID]`
- `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]`
- `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]`
- `folders/[FOLDER_ID]/logs/[LOG_ID]`

  `[LOG_ID]` must be URL-encoded. For example:

  "projects/my-project-id/logs/syslog"
  "organizations/123/logs/cloudaudit.googleapis.com%2Factivity"

  The permission `logging.logEntries.create` is needed on each project,
  organization, billing account, or folder that is receiving new log
  entries, whether the resource is specified in `logName` or in an
  individual log entry.

`
string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` The bytes for logName to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### setPartialSuccess(boolean value)

    public WriteLogEntriesRequest.Builder setPartialSuccess(boolean value)

Optional. Whether a batch's valid entries should be written even if some
other entry failed due to a permanent error such as INVALID_ARGUMENT or
PERMISSION_DENIED. If any entry failed, then the response status is the
response status of one of the failed entries. The response will include
error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by
the entries' zero-based index in the `entries`. Failed requests for which
no entries are written will not include per-entry errors.

`bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The partialSuccess to set. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` | This builder for chaining. |

### setResource(MonitoredResource value)

    public WriteLogEntriesRequest.Builder setResource(MonitoredResource value)

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `com.google.api.MonitoredResource` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |

### setResource(MonitoredResource.Builder builderForValue)

    public WriteLogEntriesRequest.Builder setResource(MonitoredResource.Builder builderForValue)

Optional. A default monitored resource object that is assigned to all log
entries in `entries` that do not specify a value for `resource`. Example:

{ "type": "gce_instance",
"labels": {
"zone": "us-central1-a", "instance_id": "00000000000000000000" }}

See LogEntry.

`.google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL];
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `builderForValue` | `com.google.api.MonitoredResource.Builder` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-logging/latest/com.google.logging.v2.WriteLogEntriesRequest.Builder` |   |