Class TargetChange

public final class TargetChange extends GeneratedMessageV3 implements TargetChangeOrBuilder

Targets being watched have changed.

Protobuf type google.firestore.v1.TargetChange

Fields

CAUSE_FIELD_NUMBER

public static final int CAUSE_FIELD_NUMBER
Field Value
TypeDescription
int

READ_TIME_FIELD_NUMBER

public static final int READ_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

RESUME_TOKEN_FIELD_NUMBER

public static final int RESUME_TOKEN_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_CHANGE_TYPE_FIELD_NUMBER

public static final int TARGET_CHANGE_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

TARGET_IDS_FIELD_NUMBER

public static final int TARGET_IDS_FIELD_NUMBER
Field Value
TypeDescription
int

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCause()

public Status getCause()

The error that resulted in this change, if applicable.

.google.rpc.Status cause = 3;

Returns
TypeDescription
com.google.rpc.Status

The cause.

getCauseOrBuilder()

public StatusOrBuilder getCauseOrBuilder()

The error that resulted in this change, if applicable.

.google.rpc.Status cause = 3;

Returns
TypeDescription
com.google.rpc.StatusOrBuilder

getDefaultInstance()

public static TargetChange getDefaultInstance()
Returns
TypeDescription
TargetChange

getDefaultInstanceForType()

public TargetChange getDefaultInstanceForType()
Returns
TypeDescription
TargetChange

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

getParserForType()

public Parser<TargetChange> getParserForType()
Returns
TypeDescription
Parser<TargetChange>
Overrides

getReadTime()

public Timestamp getReadTime()

The consistent read_time for the given target_ids (omitted when the target_ids are not at a consistent snapshot). The stream is guaranteed to send a read_time with target_ids empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not). For a given stream, read_time is guaranteed to be monotonically increasing.

.google.protobuf.Timestamp read_time = 6;

Returns
TypeDescription
Timestamp

The readTime.

getReadTimeOrBuilder()

public TimestampOrBuilder getReadTimeOrBuilder()

The consistent read_time for the given target_ids (omitted when the target_ids are not at a consistent snapshot). The stream is guaranteed to send a read_time with target_ids empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not). For a given stream, read_time is guaranteed to be monotonically increasing.

.google.protobuf.Timestamp read_time = 6;

Returns
TypeDescription
TimestampOrBuilder

getResumeToken()

public ByteString getResumeToken()

A token that can be used to resume the stream for the given target_ids, or all targets if target_ids is empty. Not set on every target change.

bytes resume_token = 4;

Returns
TypeDescription
ByteString

The resumeToken.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTargetChangeType()

public TargetChange.TargetChangeType getTargetChangeType()

The type of change that occurred.

.google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;

Returns
TypeDescription
TargetChange.TargetChangeType

The targetChangeType.

getTargetChangeTypeValue()

public int getTargetChangeTypeValue()

The type of change that occurred.

.google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1;

Returns
TypeDescription
int

The enum numeric value on the wire for targetChangeType.

getTargetIds(int index)

public int getTargetIds(int index)

The target IDs of targets that have changed. If empty, the change applies to all targets. The order of the target IDs is not defined.

repeated int32 target_ids = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
int

The targetIds at the given index.

getTargetIdsCount()

public int getTargetIdsCount()

The target IDs of targets that have changed. If empty, the change applies to all targets. The order of the target IDs is not defined.

repeated int32 target_ids = 2;

Returns
TypeDescription
int

The count of targetIds.

getTargetIdsList()

public List<Integer> getTargetIdsList()

The target IDs of targets that have changed. If empty, the change applies to all targets. The order of the target IDs is not defined.

repeated int32 target_ids = 2;

Returns
TypeDescription
List<Integer>

A list containing the targetIds.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasCause()

public boolean hasCause()

The error that resulted in this change, if applicable.

.google.rpc.Status cause = 3;

Returns
TypeDescription
boolean

Whether the cause field is set.

hasReadTime()

public boolean hasReadTime()

The consistent read_time for the given target_ids (omitted when the target_ids are not at a consistent snapshot). The stream is guaranteed to send a read_time with target_ids empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not). For a given stream, read_time is guaranteed to be monotonically increasing.

.google.protobuf.Timestamp read_time = 6;

Returns
TypeDescription
boolean

Whether the readTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilder()

public static TargetChange.Builder newBuilder()
Returns
TypeDescription
TargetChange.Builder

newBuilder(TargetChange prototype)

public static TargetChange.Builder newBuilder(TargetChange prototype)
Parameter
NameDescription
prototypeTargetChange
Returns
TypeDescription
TargetChange.Builder

newBuilderForType()

public TargetChange.Builder newBuilderForType()
Returns
TypeDescription
TargetChange.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TargetChange.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TargetChange.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

parseDelimitedFrom(InputStream input)

public static TargetChange parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TargetChange parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TargetChange parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TargetChange parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TargetChange parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TargetChange parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TargetChange parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TargetChange parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TargetChange parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TargetChange parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TargetChange parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TargetChange parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TargetChange
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TargetChange> parser()
Returns
TypeDescription
Parser<TargetChange>

toBuilder()

public TargetChange.Builder toBuilder()
Returns
TypeDescription
TargetChange.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException