Class CommitRequest.Builder (3.14.1)

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CommitRequest build()
Returns
TypeDescription
CommitRequest

buildPartial()

public CommitRequest buildPartial()
Returns
TypeDescription
CommitRequest

clear()

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

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public CommitRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CommitRequest.Builder
Overrides

clearTransaction()

public CommitRequest.Builder clearTransaction()

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

bytes transaction = 3;

Returns
TypeDescription
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
TypeDescription
CommitRequest.Builder

clone()

public CommitRequest.Builder clone()
Returns
TypeDescription
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
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 CommitRequest getDefaultInstanceForType()
Returns
TypeDescription
CommitRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getTransaction()

public ByteString getTransaction()

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

bytes transaction = 3;

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<Builder>

getWritesCount()

public int getWritesCount()

The writes to apply.

Always executed atomically and in order.

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

Returns
TypeDescription
int

getWritesList()

public List<Write> getWritesList()

The writes to apply.

Always executed atomically and in order.

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

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CommitRequest other)

public CommitRequest.Builder mergeFrom(CommitRequest other)
Parameter
NameDescription
otherCommitRequest
Returns
TypeDescription
CommitRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CommitRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The database to set.

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

The bytes for database to set.

Returns
TypeDescription
CommitRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public CommitRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueByteString

The transaction to set.

Returns
TypeDescription
CommitRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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