public static final class WriteRequest.Builder extends GeneratedMessageV3.Builder<WriteRequest.Builder> implements WriteRequestOrBuilder
The request for Firestore.Write. The first request creates a stream, or resumes an existing one from a token. When creating a new stream, the server replies with a response containing only an ID and a token, to use in the next request. When resuming a stream, the server first streams any responses later than the given token, then a response containing only an up-to-date token, to use in the next request.
Protobuf type google.firestore.v1.WriteRequest
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > WriteRequest.BuilderImplements
WriteRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addAllWrites(Iterable<? extends Write> values)
public WriteRequest.Builder addAllWrites(Iterable<? extends Write> values)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
values | Iterable<? extends com.google.firestore.v1.Write> |
Type | Description |
WriteRequest.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public WriteRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
WriteRequest.Builder |
addWrites(Write value)
public WriteRequest.Builder addWrites(Write value)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
value | Write |
Type | Description |
WriteRequest.Builder |
addWrites(Write.Builder builderForValue)
public WriteRequest.Builder addWrites(Write.Builder builderForValue)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
builderForValue | Write.Builder |
Type | Description |
WriteRequest.Builder |
addWrites(int index, Write value)
public WriteRequest.Builder addWrites(int index, Write value)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
value | Write |
Type | Description |
WriteRequest.Builder |
addWrites(int index, Write.Builder builderForValue)
public WriteRequest.Builder addWrites(int index, Write.Builder builderForValue)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
builderForValue | Write.Builder |
Type | Description |
WriteRequest.Builder |
addWritesBuilder()
public Write.Builder addWritesBuilder()
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Type | Description |
Write.Builder |
addWritesBuilder(int index)
public Write.Builder addWritesBuilder(int index)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
Type | Description |
Write.Builder |
build()
public WriteRequest build()
Type | Description |
WriteRequest |
buildPartial()
public WriteRequest buildPartial()
Type | Description |
WriteRequest |
clear()
public WriteRequest.Builder clear()
Type | Description |
WriteRequest.Builder |
clearDatabase()
public WriteRequest.Builder clearDatabase()
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
WriteRequest.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public WriteRequest.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
WriteRequest.Builder |
clearLabels()
public WriteRequest.Builder clearLabels()
Type | Description |
WriteRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public WriteRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
WriteRequest.Builder |
clearStreamId()
public WriteRequest.Builder clearStreamId()
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created.
string stream_id = 2;
Type | Description |
WriteRequest.Builder | This builder for chaining. |
clearStreamToken()
public WriteRequest.Builder clearStreamToken()
A stream token that was previously sent by the server.
The client should set this field to the token from the most recent
WriteResponse it has received. This acknowledges that the client has
received responses up to this token. After sending this token, earlier
tokens may not be used anymore.
The server may close the stream if there are too many unacknowledged
responses.
Leave this field unset when creating a new stream. To resume a stream at
a specific point, set this field and the stream_id
field.
Leave this field unset when creating a new stream.
bytes stream_token = 4;
Type | Description |
WriteRequest.Builder | This builder for chaining. |
clearWrites()
public WriteRequest.Builder clearWrites()
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Type | Description |
WriteRequest.Builder |
clone()
public WriteRequest.Builder clone()
Type | Description |
WriteRequest.Builder |
containsLabels(String key)
public boolean containsLabels(String key)
Labels associated with this write request.
map<string, string> labels = 5;
Name | Description |
key | String |
Type | Description |
boolean |
getDatabase()
public String getDatabase()
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
String | The database. |
getDatabaseBytes()
public ByteString getDatabaseBytes()
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Type | Description |
ByteString | The bytes for database. |
getDefaultInstanceForType()
public WriteRequest getDefaultInstanceForType()
Type | Description |
WriteRequest |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getLabels()
public Map<String,String> getLabels()
Use #getLabelsMap() instead.
Type | Description |
Map<String,String> |
getLabelsCount()
public int getLabelsCount()
Labels associated with this write request.
map<string, string> labels = 5;
Type | Description |
int |
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels associated with this write request.
map<string, string> labels = 5;
Type | Description |
Map<String,String> |
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels associated with this write request.
map<string, string> labels = 5;
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels associated with this write request.
map<string, string> labels = 5;
Name | Description |
key | String |
Type | Description |
String |
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Type | Description |
Map<String,String> |
getStreamId()
public String getStreamId()
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created.
string stream_id = 2;
Type | Description |
String | The streamId. |
getStreamIdBytes()
public ByteString getStreamIdBytes()
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created.
string stream_id = 2;
Type | Description |
ByteString | The bytes for streamId. |
getStreamToken()
public ByteString getStreamToken()
A stream token that was previously sent by the server.
The client should set this field to the token from the most recent
WriteResponse it has received. This acknowledges that the client has
received responses up to this token. After sending this token, earlier
tokens may not be used anymore.
The server may close the stream if there are too many unacknowledged
responses.
Leave this field unset when creating a new stream. To resume a stream at
a specific point, set this field and the stream_id
field.
Leave this field unset when creating a new stream.
bytes stream_token = 4;
Type | Description |
ByteString | The streamToken. |
getWrites(int index)
public Write getWrites(int index)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
Type | Description |
Write |
getWritesBuilder(int index)
public Write.Builder getWritesBuilder(int index)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
Type | Description |
Write.Builder |
getWritesBuilderList()
public List<Write.Builder> getWritesBuilderList()
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Type | Description |
List<Builder> |
getWritesCount()
public int getWritesCount()
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Type | Description |
int |
getWritesList()
public List<Write> getWritesList()
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Type | Description |
List<Write> |
getWritesOrBuilder(int index)
public WriteOrBuilder getWritesOrBuilder(int index)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
Type | Description |
WriteOrBuilder |
getWritesOrBuilderList()
public List<? extends WriteOrBuilder> getWritesOrBuilderList()
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Type | Description |
List<? extends com.google.firestore.v1.WriteOrBuilder> |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(WriteRequest other)
public WriteRequest.Builder mergeFrom(WriteRequest other)
Name | Description |
other | WriteRequest |
Type | Description |
WriteRequest.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public WriteRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
WriteRequest.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public WriteRequest.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
WriteRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final WriteRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
WriteRequest.Builder |
putAllLabels(Map<String,String> values)
public WriteRequest.Builder putAllLabels(Map<String,String> values)
Labels associated with this write request.
map<string, string> labels = 5;
Name | Description |
values | Map<String,String> |
Type | Description |
WriteRequest.Builder |
putLabels(String key, String value)
public WriteRequest.Builder putLabels(String key, String value)
Labels associated with this write request.
map<string, string> labels = 5;
Name | Description |
key | String |
value | String |
Type | Description |
WriteRequest.Builder |
removeLabels(String key)
public WriteRequest.Builder removeLabels(String key)
Labels associated with this write request.
map<string, string> labels = 5;
Name | Description |
key | String |
Type | Description |
WriteRequest.Builder |
removeWrites(int index)
public WriteRequest.Builder removeWrites(int index)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
Type | Description |
WriteRequest.Builder |
setDatabase(String value)
public WriteRequest.Builder setDatabase(String value)
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | String The database to set. |
Type | Description |
WriteRequest.Builder | This builder for chaining. |
setDatabaseBytes(ByteString value)
public WriteRequest.Builder setDatabaseBytes(ByteString value)
Required. The database name. In the format:
projects/{project_id}/databases/{database_id}
.
This is only required in the first message.
string database = 1 [(.google.api.field_behavior) = REQUIRED];
Name | Description |
value | ByteString The bytes for database to set. |
Type | Description |
WriteRequest.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public WriteRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
WriteRequest.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public WriteRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
WriteRequest.Builder |
setStreamId(String value)
public WriteRequest.Builder setStreamId(String value)
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created.
string stream_id = 2;
Name | Description |
value | String The streamId to set. |
Type | Description |
WriteRequest.Builder | This builder for chaining. |
setStreamIdBytes(ByteString value)
public WriteRequest.Builder setStreamIdBytes(ByteString value)
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created.
string stream_id = 2;
Name | Description |
value | ByteString The bytes for streamId to set. |
Type | Description |
WriteRequest.Builder | This builder for chaining. |
setStreamToken(ByteString value)
public WriteRequest.Builder setStreamToken(ByteString value)
A stream token that was previously sent by the server.
The client should set this field to the token from the most recent
WriteResponse it has received. This acknowledges that the client has
received responses up to this token. After sending this token, earlier
tokens may not be used anymore.
The server may close the stream if there are too many unacknowledged
responses.
Leave this field unset when creating a new stream. To resume a stream at
a specific point, set this field and the stream_id
field.
Leave this field unset when creating a new stream.
bytes stream_token = 4;
Name | Description |
value | ByteString The streamToken to set. |
Type | Description |
WriteRequest.Builder | This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final WriteRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
WriteRequest.Builder |
setWrites(int index, Write value)
public WriteRequest.Builder setWrites(int index, Write value)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
value | Write |
Type | Description |
WriteRequest.Builder |
setWrites(int index, Write.Builder builderForValue)
public WriteRequest.Builder setWrites(int index, Write.Builder builderForValue)
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests.
repeated .google.firestore.v1.Write writes = 3;
Name | Description |
index | int |
builderForValue | Write.Builder |
Type | Description |
WriteRequest.Builder |