Class BatchWriteRequest.Builder (3.26.3)

public static final class BatchWriteRequest.Builder extends GeneratedMessageV3.Builder<BatchWriteRequest.Builder> implements BatchWriteRequestOrBuilder

The request for Firestore.BatchWrite.

Protobuf type google.firestore.v1.BatchWriteRequest

Static Methods

getDescriptor()

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

Methods

addAllWrites(Iterable<? extends Write> values)

public BatchWriteRequest.Builder addAllWrites(Iterable<? extends Write> values)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
values Iterable<? extends com.google.firestore.v1.Write>
Returns
Type Description
BatchWriteRequest.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BatchWriteRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BatchWriteRequest.Builder
Overrides

addWrites(Write value)

public BatchWriteRequest.Builder addWrites(Write value)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
value Write
Returns
Type Description
BatchWriteRequest.Builder

addWrites(Write.Builder builderForValue)

public BatchWriteRequest.Builder addWrites(Write.Builder builderForValue)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
builderForValue Write.Builder
Returns
Type Description
BatchWriteRequest.Builder

addWrites(int index, Write value)

public BatchWriteRequest.Builder addWrites(int index, Write value)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameters
Name Description
index int
value Write
Returns
Type Description
BatchWriteRequest.Builder

addWrites(int index, Write.Builder builderForValue)

public BatchWriteRequest.Builder addWrites(int index, Write.Builder builderForValue)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameters
Name Description
index int
builderForValue Write.Builder
Returns
Type Description
BatchWriteRequest.Builder

addWritesBuilder()

public Write.Builder addWritesBuilder()

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Returns
Type Description
Write.Builder

addWritesBuilder(int index)

public Write.Builder addWritesBuilder(int index)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
index int
Returns
Type Description
Write.Builder

build()

public BatchWriteRequest build()
Returns
Type Description
BatchWriteRequest

buildPartial()

public BatchWriteRequest buildPartial()
Returns
Type Description
BatchWriteRequest

clear()

public BatchWriteRequest.Builder clear()
Returns
Type Description
BatchWriteRequest.Builder
Overrides

clearDatabase()

public BatchWriteRequest.Builder clearDatabase()

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BatchWriteRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BatchWriteRequest.Builder
Overrides

clearLabels()

public BatchWriteRequest.Builder clearLabels()
Returns
Type Description
BatchWriteRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BatchWriteRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BatchWriteRequest.Builder
Overrides

clearWrites()

public BatchWriteRequest.Builder clearWrites()

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Returns
Type Description
BatchWriteRequest.Builder

clone()

public BatchWriteRequest.Builder clone()
Returns
Type Description
BatchWriteRequest.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDatabase()

public String getDatabase()

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The database.

getDatabaseBytes()

public ByteString getDatabaseBytes()

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for database.

getDefaultInstanceForType()

public BatchWriteRequest getDefaultInstanceForType()
Returns
Type Description
BatchWriteRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLabels() (deprecated)

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels associated with this batch write.

map<string, string> labels = 3;

Returns
Type Description
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels associated with this batch write.

map<string, string> labels = 3;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableLabels() (deprecated)

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getWrites(int index)

public Write getWrites(int index)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
index int
Returns
Type Description
Write

getWritesBuilder(int index)

public Write.Builder getWritesBuilder(int index)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
index int
Returns
Type Description
Write.Builder

getWritesBuilderList()

public List<Write.Builder> getWritesBuilderList()

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Returns
Type Description
List<Builder>

getWritesCount()

public int getWritesCount()

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Returns
Type Description
int

getWritesList()

public List<Write> getWritesList()

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Returns
Type Description
List<Write>

getWritesOrBuilder(int index)

public WriteOrBuilder getWritesOrBuilder(int index)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
index int
Returns
Type Description
WriteOrBuilder

getWritesOrBuilderList()

public List<? extends WriteOrBuilder> getWritesOrBuilderList()

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Returns
Type Description
List<? extends com.google.firestore.v1.WriteOrBuilder>

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

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

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BatchWriteRequest other)

public BatchWriteRequest.Builder mergeFrom(BatchWriteRequest other)
Parameter
Name Description
other BatchWriteRequest
Returns
Type Description
BatchWriteRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BatchWriteRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchWriteRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BatchWriteRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BatchWriteRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BatchWriteRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BatchWriteRequest.Builder
Overrides

putAllLabels(Map<String,String> values)

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

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
BatchWriteRequest.Builder

putLabels(String key, String value)

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

Labels associated with this batch write.

map<string, string> labels = 3;

Parameters
Name Description
key String
value String
Returns
Type Description
BatchWriteRequest.Builder

removeLabels(String key)

public BatchWriteRequest.Builder removeLabels(String key)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
Name Description
key String
Returns
Type Description
BatchWriteRequest.Builder

removeWrites(int index)

public BatchWriteRequest.Builder removeWrites(int index)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameter
Name Description
index int
Returns
Type Description
BatchWriteRequest.Builder

setDatabase(String value)

public BatchWriteRequest.Builder setDatabase(String value)

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The database to set.

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

setDatabaseBytes(ByteString value)

public BatchWriteRequest.Builder setDatabaseBytes(ByteString value)

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for database to set.

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BatchWriteRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BatchWriteRequest.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BatchWriteRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BatchWriteRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BatchWriteRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BatchWriteRequest.Builder
Overrides

setWrites(int index, Write value)

public BatchWriteRequest.Builder setWrites(int index, Write value)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameters
Name Description
index int
value Write
Returns
Type Description
BatchWriteRequest.Builder

setWrites(int index, Write.Builder builderForValue)

public BatchWriteRequest.Builder setWrites(int index, Write.Builder builderForValue)

The writes to apply.

Method does not apply writes atomically and does not guarantee ordering. Each write succeeds or fails independently. You cannot write to the same document more than once per request.

repeated .google.firestore.v1.Write writes = 2;

Parameters
Name Description
index int
builderForValue Write.Builder
Returns
Type Description
BatchWriteRequest.Builder