public static final class WriteRequest.Builder extends GeneratedMessageV3.Builder<WriteRequest.Builder> implements WriteRequestOrBuilder
The request for [Firestore.Write][google.firestore.v1beta1.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.v1beta1.WriteRequest| Modifier and Type | Method and Description |
|---|---|
WriteRequest.Builder |
addAllWrites(java.lang.Iterable<? extends Write> values)
The writes to apply.
|
WriteRequest.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
WriteRequest.Builder |
addWrites(int index,
Write.Builder builderForValue)
The writes to apply.
|
WriteRequest.Builder |
addWrites(int index,
Write value)
The writes to apply.
|
WriteRequest.Builder |
addWrites(Write.Builder builderForValue)
The writes to apply.
|
WriteRequest.Builder |
addWrites(Write value)
The writes to apply.
|
Write.Builder |
addWritesBuilder()
The writes to apply.
|
Write.Builder |
addWritesBuilder(int index)
The writes to apply.
|
WriteRequest |
build() |
WriteRequest |
buildPartial() |
WriteRequest.Builder |
clear() |
WriteRequest.Builder |
clearDatabase()
The database name.
|
WriteRequest.Builder |
clearField(Descriptors.FieldDescriptor field) |
WriteRequest.Builder |
clearLabels() |
WriteRequest.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
WriteRequest.Builder |
clearStreamId()
The ID of the write stream to resume.
|
WriteRequest.Builder |
clearStreamToken()
A stream token that was previously sent by the server.
|
WriteRequest.Builder |
clearWrites()
The writes to apply.
|
WriteRequest.Builder |
clone() |
boolean |
containsLabels(java.lang.String key)
Labels associated with this write request.
|
java.lang.String |
getDatabase()
The database name.
|
ByteString |
getDatabaseBytes()
The database name.
|
WriteRequest |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
java.util.Map<java.lang.String,java.lang.String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
Labels associated with this write request.
|
java.util.Map<java.lang.String,java.lang.String> |
getLabelsMap()
Labels associated with this write request.
|
java.lang.String |
getLabelsOrDefault(java.lang.String key,
java.lang.String defaultValue)
Labels associated with this write request.
|
java.lang.String |
getLabelsOrThrow(java.lang.String key)
Labels associated with this write request.
|
java.util.Map<java.lang.String,java.lang.String> |
getMutableLabels()
Deprecated.
|
java.lang.String |
getStreamId()
The ID of the write stream to resume.
|
ByteString |
getStreamIdBytes()
The ID of the write stream to resume.
|
ByteString |
getStreamToken()
A stream token that was previously sent by the server.
|
Write |
getWrites(int index)
The writes to apply.
|
Write.Builder |
getWritesBuilder(int index)
The writes to apply.
|
java.util.List<Write.Builder> |
getWritesBuilderList()
The writes to apply.
|
int |
getWritesCount()
The writes to apply.
|
java.util.List<Write> |
getWritesList()
The writes to apply.
|
WriteOrBuilder |
getWritesOrBuilder(int index)
The writes to apply.
|
java.util.List<? extends WriteOrBuilder> |
getWritesOrBuilderList()
The writes to apply.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected MapField |
internalGetMapField(int number) |
protected MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
WriteRequest.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
WriteRequest.Builder |
mergeFrom(Message other) |
WriteRequest.Builder |
mergeFrom(WriteRequest other) |
WriteRequest.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
WriteRequest.Builder |
putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
Labels associated with this write request.
|
WriteRequest.Builder |
putLabels(java.lang.String key,
java.lang.String value)
Labels associated with this write request.
|
WriteRequest.Builder |
removeLabels(java.lang.String key)
Labels associated with this write request.
|
WriteRequest.Builder |
removeWrites(int index)
The writes to apply.
|
WriteRequest.Builder |
setDatabase(java.lang.String value)
The database name.
|
WriteRequest.Builder |
setDatabaseBytes(ByteString value)
The database name.
|
WriteRequest.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value) |
WriteRequest.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) |
WriteRequest.Builder |
setStreamId(java.lang.String value)
The ID of the write stream to resume.
|
WriteRequest.Builder |
setStreamIdBytes(ByteString value)
The ID of the write stream to resume.
|
WriteRequest.Builder |
setStreamToken(ByteString value)
A stream token that was previously sent by the server.
|
WriteRequest.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
WriteRequest.Builder |
setWrites(int index,
Write.Builder builderForValue)
The writes to apply.
|
WriteRequest.Builder |
setWrites(int index,
Write value)
The writes to apply.
|
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofmergeFrompublic static final Descriptors.Descriptor getDescriptor()
protected MapField internalGetMapField(int number)
internalGetMapField in class GeneratedMessageV3.Builder<WriteRequest.Builder>protected MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class GeneratedMessageV3.Builder<WriteRequest.Builder>protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder clear()
clear in interface Message.Builderclear in interface MessageLite.Builderclear in class GeneratedMessageV3.Builder<WriteRequest.Builder>public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface Message.BuildergetDescriptorForType in interface MessageOrBuildergetDescriptorForType in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic WriteRequest build()
build in interface Message.Builderbuild in interface MessageLite.Builderpublic WriteRequest buildPartial()
buildPartial in interface Message.BuilderbuildPartial in interface MessageLite.Builderpublic WriteRequest.Builder clone()
clone in interface Message.Builderclone in interface MessageLite.Builderclone in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField in interface Message.BuildersetField in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder clearField(Descriptors.FieldDescriptor field)
clearField in interface Message.BuilderclearField in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof in interface Message.BuilderclearOneof in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField in interface Message.BuildersetRepeatedField in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField in interface Message.BuilderaddRepeatedField in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder mergeFrom(Message other)
mergeFrom in interface Message.BuildermergeFrom in class AbstractMessage.Builder<WriteRequest.Builder>public WriteRequest.Builder mergeFrom(WriteRequest other)
public final boolean isInitialized()
isInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom in interface Message.BuildermergeFrom in interface MessageLite.BuildermergeFrom in class AbstractMessage.Builder<WriteRequest.Builder>java.io.IOExceptionpublic java.lang.String getDatabase()
The database name. In the format:
`projects/{project_id}/databases/{database_id}`.
This is only required in the first message.
string database = 1;getDatabase in interface WriteRequestOrBuilderpublic ByteString getDatabaseBytes()
The database name. In the format:
`projects/{project_id}/databases/{database_id}`.
This is only required in the first message.
string database = 1;getDatabaseBytes in interface WriteRequestOrBuilderpublic WriteRequest.Builder setDatabase(java.lang.String value)
The database name. In the format:
`projects/{project_id}/databases/{database_id}`.
This is only required in the first message.
string database = 1;public WriteRequest.Builder clearDatabase()
The database name. In the format:
`projects/{project_id}/databases/{database_id}`.
This is only required in the first message.
string database = 1;public WriteRequest.Builder setDatabaseBytes(ByteString value)
The database name. In the format:
`projects/{project_id}/databases/{database_id}`.
This is only required in the first message.
string database = 1;public java.lang.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;getStreamId in interface WriteRequestOrBuilderpublic 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;getStreamIdBytes in interface WriteRequestOrBuilderpublic WriteRequest.Builder setStreamId(java.lang.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;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;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;public java.util.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.v1beta1.Write writes = 3;getWritesList in interface WriteRequestOrBuilderpublic 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.v1beta1.Write writes = 3;getWritesCount in interface WriteRequestOrBuilderpublic 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.v1beta1.Write writes = 3;getWrites in interface WriteRequestOrBuilderpublic 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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;public WriteRequest.Builder addAllWrites(java.lang.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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;getWritesOrBuilder in interface WriteRequestOrBuilderpublic java.util.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.v1beta1.Write writes = 3;getWritesOrBuilderList in interface WriteRequestOrBuilderpublic 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.v1beta1.Write writes = 3;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.v1beta1.Write writes = 3;public java.util.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.v1beta1.Write writes = 3;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][google.firestore.v1beta1.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;getStreamToken in interface WriteRequestOrBuilderpublic 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][google.firestore.v1beta1.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;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][google.firestore.v1beta1.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;public int getLabelsCount()
WriteRequestOrBuilderLabels associated with this write request.
map<string, string> labels = 5;getLabelsCount in interface WriteRequestOrBuilderpublic boolean containsLabels(java.lang.String key)
Labels associated with this write request.
map<string, string> labels = 5;containsLabels in interface WriteRequestOrBuilder@Deprecated public java.util.Map<java.lang.String,java.lang.String> getLabels()
getLabelsMap() instead.getLabels in interface WriteRequestOrBuilderpublic java.util.Map<java.lang.String,java.lang.String> getLabelsMap()
Labels associated with this write request.
map<string, string> labels = 5;getLabelsMap in interface WriteRequestOrBuilderpublic java.lang.String getLabelsOrDefault(java.lang.String key,
java.lang.String defaultValue)
Labels associated with this write request.
map<string, string> labels = 5;getLabelsOrDefault in interface WriteRequestOrBuilderpublic java.lang.String getLabelsOrThrow(java.lang.String key)
Labels associated with this write request.
map<string, string> labels = 5;getLabelsOrThrow in interface WriteRequestOrBuilderpublic WriteRequest.Builder clearLabels()
public WriteRequest.Builder removeLabels(java.lang.String key)
Labels associated with this write request.
map<string, string> labels = 5;@Deprecated public java.util.Map<java.lang.String,java.lang.String> getMutableLabels()
public WriteRequest.Builder putLabels(java.lang.String key, java.lang.String value)
Labels associated with this write request.
map<string, string> labels = 5;public WriteRequest.Builder putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
Labels associated with this write request.
map<string, string> labels = 5;public final WriteRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields in interface Message.BuildersetUnknownFields in class GeneratedMessageV3.Builder<WriteRequest.Builder>public final WriteRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields in interface Message.BuildermergeUnknownFields in class GeneratedMessageV3.Builder<WriteRequest.Builder>