Package com.google.firestore.v1
Class WriteRequest.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
com.google.firestore.v1.WriteRequest.Builder
- All Implemented Interfaces:
WriteRequestOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- WriteRequest
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllWrites(Iterable<? extends Write> values) The writes to apply.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) The writes to apply.addWrites(int index, Write.Builder builderForValue) The writes to apply.The writes to apply.addWrites(Write.Builder builderForValue) The writes to apply.The writes to apply.addWritesBuilder(int index) The writes to apply.build()clear()Required.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) The ID of the write stream to resume.A stream token that was previously sent by the server.The writes to apply.clone()booleancontainsLabels(String key) Labels associated with this write request.Required.com.google.protobuf.ByteStringRequired.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intLabels associated with this write request.Labels associated with this write request.getLabelsOrDefault(String key, String defaultValue) Labels associated with this write request.getLabelsOrThrow(String key) Labels associated with this write request.Deprecated.The ID of the write stream to resume.com.google.protobuf.ByteStringThe ID of the write stream to resume.com.google.protobuf.ByteStringA stream token that was previously sent by the server.getWrites(int index) The writes to apply.getWritesBuilder(int index) The writes to apply.The writes to apply.intThe writes to apply.The writes to apply.getWritesOrBuilder(int index) The writes to apply.List<? extends WriteOrBuilder>The writes to apply.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeFrom(WriteRequest other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) final WriteRequest.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) putAllLabels(Map<String, String> values) Labels associated with this write request.Labels associated with this write request.removeLabels(String key) Labels associated with this write request.removeWrites(int index) The writes to apply.setDatabase(String value) Required.setDatabaseBytes(com.google.protobuf.ByteString value) Required.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setStreamId(String value) The ID of the write stream to resume.setStreamIdBytes(com.google.protobuf.ByteString value) The ID of the write stream to resume.setStreamToken(com.google.protobuf.ByteString value) A stream token that was previously sent by the server.final WriteRequest.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) The writes to apply.setWrites(int index, Write.Builder builderForValue) The writes to apply.Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
setField
public WriteRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
setRepeatedField
public WriteRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
addRepeatedField
public WriteRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WriteRequest.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
mergeFrom
public WriteRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<WriteRequest.Builder>- Throws:
IOException
-
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];- Specified by:
getDatabasein interfaceWriteRequestOrBuilder- Returns:
- The database.
-
getDatabaseBytes
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];- Specified by:
getDatabaseBytesin interfaceWriteRequestOrBuilder- Returns:
- The bytes for database.
-
setDatabase
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];- Parameters:
value- The database to set.- Returns:
- This builder for chaining.
-
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];- Returns:
- This builder for chaining.
-
setDatabaseBytes
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];- Parameters:
value- The bytes for database to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getStreamIdin interfaceWriteRequestOrBuilder- Returns:
- The streamId.
-
getStreamIdBytes
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;- Specified by:
getStreamIdBytesin interfaceWriteRequestOrBuilder- Returns:
- The bytes for streamId.
-
setStreamId
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;- Parameters:
value- The streamId to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
setStreamIdBytes
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;- Parameters:
value- The bytes for streamId to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getWritesListin interfaceWriteRequestOrBuilder
-
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;- Specified by:
getWritesCountin interfaceWriteRequestOrBuilder
-
getWrites
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;- Specified by:
getWritesin interfaceWriteRequestOrBuilder
-
setWrites
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; -
setWrites
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; -
addWrites
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; -
addWrites
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; -
addWrites
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; -
addWrites
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; -
addAllWrites
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; -
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; -
removeWrites
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; -
getWritesBuilder
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
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;- Specified by:
getWritesOrBuilderin interfaceWriteRequestOrBuilder
-
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;- Specified by:
getWritesOrBuilderListin interfaceWriteRequestOrBuilder
-
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; -
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; -
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; -
getStreamToken
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;- Specified by:
getStreamTokenin interfaceWriteRequestOrBuilder- Returns:
- The streamToken.
-
setStreamToken
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;- Parameters:
value- The streamToken to set.- Returns:
- This builder for chaining.
-
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;- Returns:
- This builder for chaining.
-
getLabelsCount
public int getLabelsCount()Description copied from interface:WriteRequestOrBuilderLabels associated with this write request.
map<string, string> labels = 5;- Specified by:
getLabelsCountin interfaceWriteRequestOrBuilder
-
containsLabels
Labels associated with this write request.
map<string, string> labels = 5;- Specified by:
containsLabelsin interfaceWriteRequestOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceWriteRequestOrBuilder
-
getLabelsMap
Labels associated with this write request.
map<string, string> labels = 5;- Specified by:
getLabelsMapin interfaceWriteRequestOrBuilder
-
getLabelsOrDefault
Labels associated with this write request.
map<string, string> labels = 5;- Specified by:
getLabelsOrDefaultin interfaceWriteRequestOrBuilder
-
getLabelsOrThrow
Labels associated with this write request.
map<string, string> labels = 5;- Specified by:
getLabelsOrThrowin interfaceWriteRequestOrBuilder
-
clearLabels
-
removeLabels
Labels associated with this write request.
map<string, string> labels = 5; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
Labels associated with this write request.
map<string, string> labels = 5; -
putAllLabels
Labels associated with this write request.
map<string, string> labels = 5; -
setUnknownFields
public final WriteRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-
mergeUnknownFields
public final WriteRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<WriteRequest.Builder>
-