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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
public 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.Builder
clear
in interface com.google.protobuf.MessageLite.Builder
clear
in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface com.google.protobuf.Message.Builder
getDescriptorForType
in interface com.google.protobuf.MessageOrBuilder
getDescriptorForType
in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public WriteRequest build()
build
in interface com.google.protobuf.Message.Builder
build
in interface com.google.protobuf.MessageLite.Builder
public WriteRequest buildPartial()
buildPartial
in interface com.google.protobuf.Message.Builder
buildPartial
in interface com.google.protobuf.MessageLite.Builder
public WriteRequest.Builder clone()
clone
in interface com.google.protobuf.Message.Builder
clone
in interface com.google.protobuf.MessageLite.Builder
clone
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.Builder
setField
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.Builder
clearField
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.Builder
clearOneof
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.Builder
setRepeatedField
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.Builder
addRepeatedField
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.Builder
mergeFrom
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.MessageLiteOrBuilder
isInitialized
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.Builder
mergeFrom
in interface com.google.protobuf.MessageLite.Builder
mergeFrom
in class com.google.protobuf.AbstractMessage.Builder<WriteRequest.Builder>
IOException
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];
getDatabase
in interface WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
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];
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 WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
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;
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 WriteRequestOrBuilder
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;
getWritesCount
in interface WriteRequestOrBuilder
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;
getWrites
in interface WriteRequestOrBuilder
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;
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 WriteRequestOrBuilder
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;
getWritesOrBuilderList
in interface WriteRequestOrBuilder
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;
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 WriteRequestOrBuilder
public 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()
WriteRequestOrBuilder
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsCount
in interface WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
public Map<String,String> getLabelsMap()
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsMap
in interface WriteRequestOrBuilder
public String getLabelsOrDefault(String key, String defaultValue)
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsOrDefault
in interface WriteRequestOrBuilder
public String getLabelsOrThrow(String key)
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsOrThrow
in interface WriteRequestOrBuilder
public 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.Builder
setUnknownFields
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.Builder
mergeUnknownFields
in class com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
Copyright © 2023 Google LLC. All rights reserved.