Class Target (3.21.0)

public final class Target extends GeneratedMessageV3 implements TargetOrBuilder

A specification of a set of documents to listen to.

Protobuf type google.firestore.v1.Target

Implements

TargetOrBuilder

Static Fields

DOCUMENTS_FIELD_NUMBER

public static final int DOCUMENTS_FIELD_NUMBER
Field Value
Type Description
int

EXPECTED_COUNT_FIELD_NUMBER

public static final int EXPECTED_COUNT_FIELD_NUMBER
Field Value
Type Description
int

ONCE_FIELD_NUMBER

public static final int ONCE_FIELD_NUMBER
Field Value
Type Description
int

QUERY_FIELD_NUMBER

public static final int QUERY_FIELD_NUMBER
Field Value
Type Description
int

READ_TIME_FIELD_NUMBER

public static final int READ_TIME_FIELD_NUMBER
Field Value
Type Description
int

RESUME_TOKEN_FIELD_NUMBER

public static final int RESUME_TOKEN_FIELD_NUMBER
Field Value
Type Description
int

TARGET_ID_FIELD_NUMBER

public static final int TARGET_ID_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Target getDefaultInstance()
Returns
Type Description
Target

getDescriptor()

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

newBuilder()

public static Target.Builder newBuilder()
Returns
Type Description
Target.Builder

newBuilder(Target prototype)

public static Target.Builder newBuilder(Target prototype)
Parameter
Name Description
prototype Target
Returns
Type Description
Target.Builder

parseDelimitedFrom(InputStream input)

public static Target parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Target
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Target parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Target parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Target
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Target parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Target parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Target
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Target parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Target parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Target
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Target parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Target parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Target
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Target parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Target parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Target
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Target parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Target
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Target> parser()
Returns
Type Description
Parser<Target>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public Target getDefaultInstanceForType()
Returns
Type Description
Target

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.

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.

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.

getParserForType()

public Parser<Target> getParserForType()
Returns
Type Description
Parser<Target>
Overrides

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.

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Target.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Target.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException