Package com.google.firestore.v1
Class Target.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
com.google.firestore.v1.Target.Builder
- All Implemented Interfaces:
TargetOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Target
public static final class Target.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
implements TargetOrBuilder
A specification of a set of documents to listen to.Protobuf type
google.firestore.v1.Target-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()clear()A target specified by a set of document names.The number of documents that last matched the query at the resume token or read time.clearField(com.google.protobuf.Descriptors.FieldDescriptor field) If the target should be removed once it is current and consistent.clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) A target specified by a query.Start listening after a specific `read_time`.A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.The target ID that identifies the target on the stream.clone()static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorA target specified by a set of document names.A target specified by a set of document names.A target specified by a set of document names.com.google.protobuf.Int32ValueThe number of documents that last matched the query at the resume token or read time.com.google.protobuf.Int32Value.BuilderThe number of documents that last matched the query at the resume token or read time.com.google.protobuf.Int32ValueOrBuilderThe number of documents that last matched the query at the resume token or read time.booleangetOnce()If the target should be removed once it is current and consistent.getQuery()A target specified by a query.A target specified by a query.A target specified by a query.com.google.protobuf.TimestampStart listening after a specific `read_time`.com.google.protobuf.Timestamp.BuilderStart listening after a specific `read_time`.com.google.protobuf.TimestampOrBuilderStart listening after a specific `read_time`.com.google.protobuf.ByteStringA resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.intThe target ID that identifies the target on the stream.booleanA target specified by a set of document names.booleanThe number of documents that last matched the query at the resume token or read time.booleanhasQuery()A target specified by a query.booleanStart listening after a specific `read_time`.booleanA resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTablefinal booleanA target specified by a set of document names.mergeExpectedCount(com.google.protobuf.Int32Value value) The number of documents that last matched the query at the resume token or read time.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeQuery(Target.QueryTarget value) A target specified by a query.mergeReadTime(com.google.protobuf.Timestamp value) Start listening after a specific `read_time`.final Target.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) A target specified by a set of document names.setDocuments(Target.DocumentsTarget.Builder builderForValue) A target specified by a set of document names.setExpectedCount(com.google.protobuf.Int32Value value) The number of documents that last matched the query at the resume token or read time.setExpectedCount(com.google.protobuf.Int32Value.Builder builderForValue) The number of documents that last matched the query at the resume token or read time.setOnce(boolean value) If the target should be removed once it is current and consistent.setQuery(Target.QueryTarget value) A target specified by a query.setQuery(Target.QueryTarget.Builder builderForValue) A target specified by a query.setReadTime(com.google.protobuf.Timestamp value) Start listening after a specific `read_time`.setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) Start listening after a specific `read_time`.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setResumeToken(com.google.protobuf.ByteString value) A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target.setTargetId(int value) The target ID that identifies the target on the stream.final Target.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, 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() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<Target.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<Target.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<Target.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<Target.Builder>
-
setField
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
-
clearField
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
-
clearOneof
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
-
setRepeatedField
public Target.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<Target.Builder>
-
addRepeatedField
public Target.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<Target.Builder>
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Target.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
-
mergeFrom
public Target.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<Target.Builder>- Throws:
IOException
-
getTargetTypeCase
- Specified by:
getTargetTypeCasein interfaceTargetOrBuilder
-
clearTargetType
-
getResumeTypeCase
- Specified by:
getResumeTypeCasein interfaceTargetOrBuilder
-
clearResumeType
-
hasQuery
public boolean hasQuery()A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2;- Specified by:
hasQueryin interfaceTargetOrBuilder- Returns:
- Whether the query field is set.
-
getQuery
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2;- Specified by:
getQueryin interfaceTargetOrBuilder- Returns:
- The query.
-
setQuery
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2; -
setQuery
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2; -
mergeQuery
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2; -
clearQuery
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2; -
getQueryBuilder
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2; -
getQueryOrBuilder
A target specified by a query.
.google.firestore.v1.Target.QueryTarget query = 2;- Specified by:
getQueryOrBuilderin interfaceTargetOrBuilder
-
hasDocuments
public boolean hasDocuments()A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3;- Specified by:
hasDocumentsin interfaceTargetOrBuilder- Returns:
- Whether the documents field is set.
-
getDocuments
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3;- Specified by:
getDocumentsin interfaceTargetOrBuilder- Returns:
- The documents.
-
setDocuments
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3; -
setDocuments
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3; -
mergeDocuments
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3; -
clearDocuments
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3; -
getDocumentsBuilder
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3; -
getDocumentsOrBuilder
A target specified by a set of document names.
.google.firestore.v1.Target.DocumentsTarget documents = 3;- Specified by:
getDocumentsOrBuilderin interfaceTargetOrBuilder
-
hasResumeToken
public boolean hasResumeToken()A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. Using a resume token with a different target is unsupported and may fail.
bytes resume_token = 4;- Specified by:
hasResumeTokenin interfaceTargetOrBuilder- Returns:
- Whether the resumeToken field is set.
-
getResumeToken
public com.google.protobuf.ByteString getResumeToken()A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. Using a resume token with a different target is unsupported and may fail.
bytes resume_token = 4;- Specified by:
getResumeTokenin interfaceTargetOrBuilder- Returns:
- The resumeToken.
-
setResumeToken
A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. Using a resume token with a different target is unsupported and may fail.
bytes resume_token = 4;- Parameters:
value- The resumeToken to set.- Returns:
- This builder for chaining.
-
clearResumeToken
A resume token from a prior [TargetChange][google.firestore.v1.TargetChange] for an identical target. Using a resume token with a different target is unsupported and may fail.
bytes resume_token = 4;- Returns:
- This builder for chaining.
-
hasReadTime
public boolean hasReadTime()Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11;- Specified by:
hasReadTimein interfaceTargetOrBuilder- Returns:
- Whether the readTime field is set.
-
getReadTime
public com.google.protobuf.Timestamp getReadTime()Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11;- Specified by:
getReadTimein interfaceTargetOrBuilder- Returns:
- The readTime.
-
setReadTime
Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11; -
setReadTime
Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11; -
mergeReadTime
Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11; -
clearReadTime
Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11; -
getReadTimeBuilder
public com.google.protobuf.Timestamp.Builder getReadTimeBuilder()Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11; -
getReadTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder()Start listening after a specific `read_time`. The client must know the state of matching documents at this time.
.google.protobuf.Timestamp read_time = 11;- Specified by:
getReadTimeOrBuilderin interfaceTargetOrBuilder
-
getTargetId
public int getTargetId()The target ID that identifies the target on the stream. Must be a positive number and non-zero. If `target_id` is 0 (or unspecified), the server will assign an ID for this target and return that in a `TargetChange::ADD` event. Once a target with `target_id=0` is added, all subsequent targets must also have `target_id=0`. If an `AddTarget` request with `target_id != 0` is sent to the server after a target with `target_id=0` is added, the server will immediately send a response with a `TargetChange::Remove` event. Note that if the client sends multiple `AddTarget` requests without an ID, the order of IDs returned in `TargetChage.target_ids` are undefined. Therefore, clients should provide a target ID instead of relying on the server to assign one. If `target_id` is non-zero, there must not be an existing active target on this stream with the same ID.
int32 target_id = 5;- Specified by:
getTargetIdin interfaceTargetOrBuilder- Returns:
- The targetId.
-
setTargetId
The target ID that identifies the target on the stream. Must be a positive number and non-zero. If `target_id` is 0 (or unspecified), the server will assign an ID for this target and return that in a `TargetChange::ADD` event. Once a target with `target_id=0` is added, all subsequent targets must also have `target_id=0`. If an `AddTarget` request with `target_id != 0` is sent to the server after a target with `target_id=0` is added, the server will immediately send a response with a `TargetChange::Remove` event. Note that if the client sends multiple `AddTarget` requests without an ID, the order of IDs returned in `TargetChage.target_ids` are undefined. Therefore, clients should provide a target ID instead of relying on the server to assign one. If `target_id` is non-zero, there must not be an existing active target on this stream with the same ID.
int32 target_id = 5;- Parameters:
value- The targetId to set.- Returns:
- This builder for chaining.
-
clearTargetId
The target ID that identifies the target on the stream. Must be a positive number and non-zero. If `target_id` is 0 (or unspecified), the server will assign an ID for this target and return that in a `TargetChange::ADD` event. Once a target with `target_id=0` is added, all subsequent targets must also have `target_id=0`. If an `AddTarget` request with `target_id != 0` is sent to the server after a target with `target_id=0` is added, the server will immediately send a response with a `TargetChange::Remove` event. Note that if the client sends multiple `AddTarget` requests without an ID, the order of IDs returned in `TargetChage.target_ids` are undefined. Therefore, clients should provide a target ID instead of relying on the server to assign one. If `target_id` is non-zero, there must not be an existing active target on this stream with the same ID.
int32 target_id = 5;- Returns:
- This builder for chaining.
-
getOnce
public boolean getOnce()If the target should be removed once it is current and consistent.
bool once = 6;- Specified by:
getOncein interfaceTargetOrBuilder- Returns:
- The once.
-
setOnce
If the target should be removed once it is current and consistent.
bool once = 6;- Parameters:
value- The once to set.- Returns:
- This builder for chaining.
-
clearOnce
If the target should be removed once it is current and consistent.
bool once = 6;- Returns:
- This builder for chaining.
-
hasExpectedCount
public boolean hasExpectedCount()The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12;- Specified by:
hasExpectedCountin interfaceTargetOrBuilder- Returns:
- Whether the expectedCount field is set.
-
getExpectedCount
public com.google.protobuf.Int32Value getExpectedCount()The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12;- Specified by:
getExpectedCountin interfaceTargetOrBuilder- Returns:
- The expectedCount.
-
setExpectedCount
The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12; -
setExpectedCount
The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12; -
mergeExpectedCount
The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12; -
clearExpectedCount
The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12; -
getExpectedCountBuilder
public com.google.protobuf.Int32Value.Builder getExpectedCountBuilder()The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12; -
getExpectedCountOrBuilder
public com.google.protobuf.Int32ValueOrBuilder getExpectedCountOrBuilder()The number of documents that last matched the query at the resume token or read time. This value is only relevant when a `resume_type` is provided. This value being present and greater than zero signals that the client wants `ExistenceFilter.unchanged_names` to be included in the response.
.google.protobuf.Int32Value expected_count = 12;- Specified by:
getExpectedCountOrBuilderin interfaceTargetOrBuilder
-
setUnknownFields
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
-
mergeUnknownFields
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<Target.Builder>
-