Class Target.Builder (3.21.3)

public static final class Target.Builder extends GeneratedMessageV3.Builder<Target.Builder> implements TargetOrBuilder

A specification of a set of documents to listen to.

Protobuf type google.firestore.v1.Target

Implements

TargetOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Target.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Target.Builder
Overrides

build()

public Target build()
Returns
Type Description
Target

buildPartial()

public Target buildPartial()
Returns
Type Description
Target

clear()

public Target.Builder clear()
Returns
Type Description
Target.Builder
Overrides

clearDocuments()

public Target.Builder clearDocuments()

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Returns
Type Description
Target.Builder

clearExpectedCount()

public Target.Builder 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;

Returns
Type Description
Target.Builder

clearField(Descriptors.FieldDescriptor field)

public Target.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Target.Builder
Overrides

clearOnce()

public Target.Builder clearOnce()

If the target should be removed once it is current and consistent.

bool once = 6;

Returns
Type Description
Target.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Target.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Target.Builder
Overrides

clearQuery()

public Target.Builder clearQuery()

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Returns
Type Description
Target.Builder

clearReadTime()

public Target.Builder 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;

Returns
Type Description
Target.Builder

clearResumeToken()

public Target.Builder clearResumeToken()

A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

bytes resume_token = 4;

Returns
Type Description
Target.Builder

This builder for chaining.

clearResumeType()

public Target.Builder clearResumeType()
Returns
Type Description
Target.Builder

clearTargetId()

public Target.Builder 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
Type Description
Target.Builder

This builder for chaining.

clearTargetType()

public Target.Builder clearTargetType()
Returns
Type Description
Target.Builder

clone()

public Target.Builder clone()
Returns
Type Description
Target.Builder
Overrides

getDefaultInstanceForType()

public Target getDefaultInstanceForType()
Returns
Type Description
Target

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDocuments()

public Target.DocumentsTarget getDocuments()

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Returns
Type Description
Target.DocumentsTarget

The documents.

getDocumentsBuilder()

public Target.DocumentsTarget.Builder getDocumentsBuilder()

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Returns
Type Description
Target.DocumentsTarget.Builder

getDocumentsOrBuilder()

public Target.DocumentsTargetOrBuilder getDocumentsOrBuilder()

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Returns
Type Description
Target.DocumentsTargetOrBuilder

getExpectedCount()

public 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;

Returns
Type Description
Int32Value

The expectedCount.

getExpectedCountBuilder()

public 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;

Returns
Type Description
Builder

getExpectedCountOrBuilder()

public 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;

Returns
Type Description
Int32ValueOrBuilder

getOnce()

public boolean getOnce()

If the target should be removed once it is current and consistent.

bool once = 6;

Returns
Type Description
boolean

The once.

getQuery()

public Target.QueryTarget getQuery()

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Returns
Type Description
Target.QueryTarget

The query.

getQueryBuilder()

public Target.QueryTarget.Builder getQueryBuilder()

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Returns
Type Description
Target.QueryTarget.Builder

getQueryOrBuilder()

public Target.QueryTargetOrBuilder getQueryOrBuilder()

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Returns
Type Description
Target.QueryTargetOrBuilder

getReadTime()

public 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;

Returns
Type Description
Timestamp

The readTime.

getReadTimeBuilder()

public 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;

Returns
Type Description
Builder

getReadTimeOrBuilder()

public 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;

Returns
Type Description
TimestampOrBuilder

getResumeToken()

public ByteString getResumeToken()

A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

bytes resume_token = 4;

Returns
Type Description
ByteString

The resumeToken.

getResumeTypeCase()

public Target.ResumeTypeCase getResumeTypeCase()
Returns
Type Description
Target.ResumeTypeCase

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;

Returns
Type Description
int

The targetId.

getTargetTypeCase()

public Target.TargetTypeCase getTargetTypeCase()
Returns
Type Description
Target.TargetTypeCase

hasDocuments()

public boolean hasDocuments()

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Returns
Type Description
boolean

Whether the documents field is set.

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;

Returns
Type Description
boolean

Whether the expectedCount field is set.

hasQuery()

public boolean hasQuery()

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Returns
Type Description
boolean

Whether the query field is set.

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;

Returns
Type Description
boolean

Whether the readTime field is set.

hasResumeToken()

public boolean hasResumeToken()

A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

bytes resume_token = 4;

Returns
Type Description
boolean

Whether the resumeToken field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDocuments(Target.DocumentsTarget value)

public Target.Builder mergeDocuments(Target.DocumentsTarget value)

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Parameter
Name Description
value Target.DocumentsTarget
Returns
Type Description
Target.Builder

mergeExpectedCount(Int32Value value)

public Target.Builder mergeExpectedCount(Int32Value value)

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;

Parameter
Name Description
value Int32Value
Returns
Type Description
Target.Builder

mergeFrom(Target other)

public Target.Builder mergeFrom(Target other)
Parameter
Name Description
other Target
Returns
Type Description
Target.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Target.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Target.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Target.Builder
Overrides

mergeQuery(Target.QueryTarget value)

public Target.Builder mergeQuery(Target.QueryTarget value)

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Parameter
Name Description
value Target.QueryTarget
Returns
Type Description
Target.Builder

mergeReadTime(Timestamp value)

public Target.Builder mergeReadTime(Timestamp value)

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;

Parameter
Name Description
value Timestamp
Returns
Type Description
Target.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Target.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Target.Builder
Overrides

setDocuments(Target.DocumentsTarget value)

public Target.Builder setDocuments(Target.DocumentsTarget value)

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Parameter
Name Description
value Target.DocumentsTarget
Returns
Type Description
Target.Builder

setDocuments(Target.DocumentsTarget.Builder builderForValue)

public Target.Builder setDocuments(Target.DocumentsTarget.Builder builderForValue)

A target specified by a set of document names.

.google.firestore.v1.Target.DocumentsTarget documents = 3;

Parameter
Name Description
builderForValue Target.DocumentsTarget.Builder
Returns
Type Description
Target.Builder

setExpectedCount(Int32Value value)

public Target.Builder setExpectedCount(Int32Value value)

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;

Parameter
Name Description
value Int32Value
Returns
Type Description
Target.Builder

setExpectedCount(Int32Value.Builder builderForValue)

public Target.Builder setExpectedCount(Int32Value.Builder builderForValue)

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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Target.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Target.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Target.Builder
Overrides

setOnce(boolean value)

public Target.Builder setOnce(boolean value)

If the target should be removed once it is current and consistent.

bool once = 6;

Parameter
Name Description
value boolean

The once to set.

Returns
Type Description
Target.Builder

This builder for chaining.

setQuery(Target.QueryTarget value)

public Target.Builder setQuery(Target.QueryTarget value)

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Parameter
Name Description
value Target.QueryTarget
Returns
Type Description
Target.Builder

setQuery(Target.QueryTarget.Builder builderForValue)

public Target.Builder setQuery(Target.QueryTarget.Builder builderForValue)

A target specified by a query.

.google.firestore.v1.Target.QueryTarget query = 2;

Parameter
Name Description
builderForValue Target.QueryTarget.Builder
Returns
Type Description
Target.Builder

setReadTime(Timestamp value)

public Target.Builder setReadTime(Timestamp value)

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;

Parameter
Name Description
value Timestamp
Returns
Type Description
Target.Builder

setReadTime(Timestamp.Builder builderForValue)

public Target.Builder setReadTime(Timestamp.Builder builderForValue)

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;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Target.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Target.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Target.Builder
Overrides

setResumeToken(ByteString value)

public Target.Builder setResumeToken(ByteString value)

A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

bytes resume_token = 4;

Parameter
Name Description
value ByteString

The resumeToken to set.

Returns
Type Description
Target.Builder

This builder for chaining.

setTargetId(int value)

public Target.Builder setTargetId(int value)

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;

Parameter
Name Description
value int

The targetId to set.

Returns
Type Description
Target.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Target.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Target.Builder
Overrides