Class CommitRequest.Builder (3.21.4)

public static final class CommitRequest.Builder extends GeneratedMessageV3.Builder<CommitRequest.Builder> implements CommitRequestOrBuilder

The request for Firestore.Commit.

Protobuf type google.firestore.v1.CommitRequest

Static Methods

getDescriptor()

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

Methods

addAllWrites(Iterable<? extends Write> values)

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

The writes to apply.

Always executed atomically and in order.

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

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addWrites(Write value)

public CommitRequest.Builder addWrites(Write value)

The writes to apply.

Always executed atomically and in order.

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

Parameter
Name Description
value Write
Returns
Type Description
CommitRequest.Builder

addWrites(Write.Builder builderForValue)

public CommitRequest.Builder addWrites(Write.Builder builderForValue)

The writes to apply.

Always executed atomically and in order.

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

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

addWrites(int index, Write value)

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

The writes to apply.

Always executed atomically and in order.

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

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

addWrites(int index, Write.Builder builderForValue)

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

The writes to apply.

Always executed atomically and in order.

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

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

addWritesBuilder()

public Write.Builder addWritesBuilder()

The writes to apply.

Always executed atomically and in order.

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.

Always executed atomically and in order.

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

Parameter
Name Description
index int
Returns
Type Description
Write.Builder

build()

public CommitRequest build()
Returns
Type Description
CommitRequest

buildPartial()

public CommitRequest buildPartial()
Returns
Type Description
CommitRequest

clear()

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

clearDatabase()

public CommitRequest.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
CommitRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTransaction()

public CommitRequest.Builder clearTransaction()

If set, applies all writes in this transaction, and commits it.

bytes transaction = 3;

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

clearWrites()

public CommitRequest.Builder clearWrites()

The writes to apply.

Always executed atomically and in order.

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

Returns
Type Description
CommitRequest.Builder

clone()

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

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 CommitRequest getDefaultInstanceForType()
Returns
Type Description
CommitRequest

getDescriptorForType()

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

getTransaction()

public ByteString getTransaction()

If set, applies all writes in this transaction, and commits it.

bytes transaction = 3;

Returns
Type Description
ByteString

The transaction.

getWrites(int index)

public Write getWrites(int index)

The writes to apply.

Always executed atomically and in order.

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.

Always executed atomically and in order.

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.

Always executed atomically and in order.

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

Returns
Type Description
List<Builder>

getWritesCount()

public int getWritesCount()

The writes to apply.

Always executed atomically and in order.

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

Returns
Type Description
int

getWritesList()

public List<Write> getWritesList()

The writes to apply.

Always executed atomically and in order.

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

Returns
Type Description
List<Write>

getWritesOrBuilder(int index)

public WriteOrBuilder getWritesOrBuilder(int index)

The writes to apply.

Always executed atomically and in order.

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.

Always executed atomically and in order.

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CommitRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeWrites(int index)

public CommitRequest.Builder removeWrites(int index)

The writes to apply.

Always executed atomically and in order.

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

Parameter
Name Description
index int
Returns
Type Description
CommitRequest.Builder

setDatabase(String value)

public CommitRequest.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
CommitRequest.Builder

This builder for chaining.

setDatabaseBytes(ByteString value)

public CommitRequest.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
CommitRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setTransaction(ByteString value)

public CommitRequest.Builder setTransaction(ByteString value)

If set, applies all writes in this transaction, and commits it.

bytes transaction = 3;

Parameter
Name Description
value ByteString

The transaction to set.

Returns
Type Description
CommitRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setWrites(int index, Write value)

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

The writes to apply.

Always executed atomically and in order.

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

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

setWrites(int index, Write.Builder builderForValue)

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

The writes to apply.

Always executed atomically and in order.

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

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