public static final class WriteRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder> implements WriteRequestOrBuilder
The request for [Firestore.Write][google.firestore.v1.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| Modifier and Type | Method and Description |
|---|---|
WriteRequest.Builder |
addAllWrites(Iterable<? extends Write> values)
The writes to apply.
|
WriteRequest.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
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()
Required.
|
WriteRequest.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
WriteRequest.Builder |
clearLabels() |
WriteRequest.Builder |
clearOneof(com.google.protobuf.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(String key)
Labels associated with this write request.
|
String |
getDatabase()
Required.
|
com.google.protobuf.ByteString |
getDatabaseBytes()
Required.
|
WriteRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
Labels associated with this write request.
|
Map<String,String> |
getLabelsMap()
Labels associated with this write request.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
Labels associated with this write request.
|
String |
getLabelsOrThrow(String key)
Labels associated with this write request.
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
String |
getStreamId()
The ID of the write stream to resume.
|
com.google.protobuf.ByteString |
getStreamIdBytes()
The ID of the write stream to resume.
|
com.google.protobuf.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.
|
List<Write.Builder> |
getWritesBuilderList()
The writes to apply.
|
int |
getWritesCount()
The writes to apply.
|
List<Write> |
getWritesList()
The writes to apply.
|
WriteOrBuilder |
getWritesOrBuilder(int index)
The writes to apply.
|
List<? extends WriteOrBuilder> |
getWritesOrBuilderList()
The writes to apply.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
WriteRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
WriteRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
WriteRequest.Builder |
mergeFrom(WriteRequest other) |
WriteRequest.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
WriteRequest.Builder |
putAllLabels(Map<String,String> values)
Labels associated with this write request.
|
WriteRequest.Builder |
putLabels(String key,
String value)
Labels associated with this write request.
|
WriteRequest.Builder |
removeLabels(String key)
Labels associated with this write request.
|
WriteRequest.Builder |
removeWrites(int index)
The writes to apply.
|
WriteRequest.Builder |
setDatabase(String value)
Required.
|
WriteRequest.Builder |
setDatabaseBytes(com.google.protobuf.ByteString value)
Required.
|
WriteRequest.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
WriteRequest.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
WriteRequest.Builder |
setStreamId(String value)
The ID of the write stream to resume.
|
WriteRequest.Builder |
setStreamIdBytes(com.google.protobuf.ByteString value)
The ID of the write stream to resume.
|
WriteRequest.Builder |
setStreamToken(com.google.protobuf.ByteString value)
A stream token that was previously sent by the server.
|
WriteRequest.Builder |
setUnknownFields(com.google.protobuf.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, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic WriteRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic WriteRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic WriteRequest.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<WriteRequest.Builder>public WriteRequest.Builder mergeFrom(WriteRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public WriteRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<WriteRequest.Builder>IOExceptionpublic 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];getDatabase in interface WriteRequestOrBuilderpublic com.google.protobuf.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];getDatabaseBytes in interface WriteRequestOrBuilderpublic 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];value - The database to set.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];public WriteRequest.Builder setDatabaseBytes(com.google.protobuf.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];value - The bytes for database to set.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;getStreamId in interface WriteRequestOrBuilderpublic com.google.protobuf.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(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;value - The streamId to set.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(com.google.protobuf.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;value - The bytes for streamId to set.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;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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.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.v1.Write writes = 3;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;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;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;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;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;getWritesOrBuilder in interface WriteRequestOrBuilderpublic 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;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.v1.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.v1.Write writes = 3;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;public com.google.protobuf.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.v1.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(com.google.protobuf.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.v1.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;value - The streamToken to set.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.v1.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(String key)
Labels associated with this write request.
map<string, string> labels = 5;containsLabels in interface WriteRequestOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface WriteRequestOrBuilderpublic Map<String,String> getLabelsMap()
Labels associated with this write request.
map<string, string> labels = 5;getLabelsMap in interface WriteRequestOrBuilderpublic String getLabelsOrDefault(String key, String defaultValue)
Labels associated with this write request.
map<string, string> labels = 5;getLabelsOrDefault in interface WriteRequestOrBuilderpublic String getLabelsOrThrow(String key)
Labels associated with this write request.
map<string, string> labels = 5;getLabelsOrThrow in interface WriteRequestOrBuilderpublic WriteRequest.Builder clearLabels()
public WriteRequest.Builder removeLabels(String key)
Labels associated with this write request.
map<string, string> labels = 5;@Deprecated public Map<String,String> getMutableLabels()
public WriteRequest.Builder putLabels(String key, String value)
Labels associated with this write request.
map<string, string> labels = 5;public WriteRequest.Builder putAllLabels(Map<String,String> values)
Labels associated with this write request.
map<string, string> labels = 5;public final WriteRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>public final WriteRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>Copyright © 2023 Google LLC. All rights reserved.