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, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public 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.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public WriteRequest build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public WriteRequest buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public WriteRequest.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<WriteRequest.Builder>
public WriteRequest.Builder mergeFrom(WriteRequest other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public WriteRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<WriteRequest.Builder>
java.io.IOException
public 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 WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
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;
getStreamIdBytes
in interface WriteRequestOrBuilder
public 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 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.v1beta1.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.v1beta1.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.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 WriteRequestOrBuilder
public 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 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.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 WriteRequestOrBuilder
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][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()
WriteRequestOrBuilder
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsCount
in interface WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
public java.util.Map<java.lang.String,java.lang.String> getLabelsMap()
Labels associated with this write request.
map<string, string> labels = 5;
getLabelsMap
in interface WriteRequestOrBuilder
public 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 WriteRequestOrBuilder
public java.lang.String getLabelsOrThrow(java.lang.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(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.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<WriteRequest.Builder>
public final WriteRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<WriteRequest.Builder>