Class BatchWriteRequest.Builder (3.0.21)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.firestore.v1.Write>
Returns
TypeDescription
BatchWriteRequest.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BatchWriteRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueWrite
Returns
TypeDescription
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
NameDescription
builderForValueWrite.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueWrite
Returns
TypeDescription
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
NameDescription
indexint
builderForValueWrite.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Write.Builder

build()

public BatchWriteRequest build()
Returns
TypeDescription
BatchWriteRequest

buildPartial()

public BatchWriteRequest buildPartial()
Returns
TypeDescription
BatchWriteRequest

clear()

public BatchWriteRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
BatchWriteRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BatchWriteRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BatchWriteRequest.Builder
Overrides

clearLabels()

public BatchWriteRequest.Builder clearLabels()
Returns
TypeDescription
BatchWriteRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BatchWriteRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
BatchWriteRequest.Builder

clone()

public BatchWriteRequest.Builder clone()
Returns
TypeDescription
BatchWriteRequest.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for database.

getDefaultInstanceForType()

public BatchWriteRequest getDefaultInstanceForType()
Returns
TypeDescription
BatchWriteRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels associated with this batch write.

map<string, string> labels = 3;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels associated with this batch write.

map<string, string> labels = 3;

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

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.firestore.v1.WriteOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

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

internalGetMutableMapField(int number)

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

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(BatchWriteRequest other)

public BatchWriteRequest.Builder mergeFrom(BatchWriteRequest other)
Parameter
NameDescription
otherBatchWriteRequest
Returns
TypeDescription
BatchWriteRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BatchWriteRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchWriteRequest.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BatchWriteRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BatchWriteRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BatchWriteRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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
NameDescription
keyString
valueString
Returns
TypeDescription
BatchWriteRequest.Builder

removeLabels(String key)

public BatchWriteRequest.Builder removeLabels(String key)

Labels associated with this batch write.

map<string, string> labels = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The database to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for database to set.

Returns
TypeDescription
BatchWriteRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BatchWriteRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BatchWriteRequest.Builder
Overrides

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

public BatchWriteRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BatchWriteRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final BatchWriteRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
valueWrite
Returns
TypeDescription
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
NameDescription
indexint
builderForValueWrite.Builder
Returns
TypeDescription
BatchWriteRequest.Builder