Class DocumentChange.Builder (3.24.3)

public static final class DocumentChange.Builder extends GeneratedMessageV3.Builder<DocumentChange.Builder> implements DocumentChangeOrBuilder

A Document has changed.

May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document.

Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.

Protobuf type google.firestore.v1.DocumentChange

Static Methods

getDescriptor()

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

Methods

addAllRemovedTargetIds(Iterable<? extends Integer> values)

public DocumentChange.Builder addAllRemovedTargetIds(Iterable<? extends Integer> values)

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The removedTargetIds to add.

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

addAllTargetIds(Iterable<? extends Integer> values)

public DocumentChange.Builder addAllTargetIds(Iterable<? extends Integer> values)

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The targetIds to add.

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

addRemovedTargetIds(int value)

public DocumentChange.Builder addRemovedTargetIds(int value)

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Parameter
Name Description
value int

The removedTargetIds to add.

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTargetIds(int value)

public DocumentChange.Builder addTargetIds(int value)

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Parameter
Name Description
value int

The targetIds to add.

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

build()

public DocumentChange build()
Returns
Type Description
DocumentChange

buildPartial()

public DocumentChange buildPartial()
Returns
Type Description
DocumentChange

clear()

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

clearDocument()

public DocumentChange.Builder clearDocument()

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Returns
Type Description
DocumentChange.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRemovedTargetIds()

public DocumentChange.Builder clearRemovedTargetIds()

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

clearTargetIds()

public DocumentChange.Builder clearTargetIds()

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public DocumentChange getDefaultInstanceForType()
Returns
Type Description
DocumentChange

getDescriptorForType()

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

getDocument()

public Document getDocument()

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Returns
Type Description
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Returns
Type Description
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Returns
Type Description
DocumentOrBuilder

getRemovedTargetIds(int index)

public int getRemovedTargetIds(int index)

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The removedTargetIds at the given index.

getRemovedTargetIdsCount()

public int getRemovedTargetIdsCount()

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Returns
Type Description
int

The count of removedTargetIds.

getRemovedTargetIdsList()

public List<Integer> getRemovedTargetIdsList()

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Returns
Type Description
List<Integer>

A list containing the removedTargetIds.

getTargetIds(int index)

public int getTargetIds(int index)

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The targetIds at the given index.

getTargetIdsCount()

public int getTargetIdsCount()

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Returns
Type Description
int

The count of targetIds.

getTargetIdsList()

public List<Integer> getTargetIdsList()

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Returns
Type Description
List<Integer>

A list containing the targetIds.

hasDocument()

public boolean hasDocument()

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Returns
Type Description
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeDocument(Document value)

public DocumentChange.Builder mergeDocument(Document value)

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Parameter
Name Description
value Document
Returns
Type Description
DocumentChange.Builder

mergeFrom(DocumentChange other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDocument(Document value)

public DocumentChange.Builder setDocument(Document value)

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Parameter
Name Description
value Document
Returns
Type Description
DocumentChange.Builder

setDocument(Document.Builder builderForValue)

public DocumentChange.Builder setDocument(Document.Builder builderForValue)

The new state of the Document.

If mask is set, contains only fields that were updated or added.

.google.firestore.v1.Document document = 1;

Parameter
Name Description
builderForValue Document.Builder
Returns
Type Description
DocumentChange.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setRemovedTargetIds(int index, int value)

public DocumentChange.Builder setRemovedTargetIds(int index, int value)

A set of target IDs for targets that no longer match this document.

repeated int32 removed_target_ids = 6;

Parameters
Name Description
index int

The index to set the value at.

value int

The removedTargetIds to set.

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

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

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

setTargetIds(int index, int value)

public DocumentChange.Builder setTargetIds(int index, int value)

A set of target IDs of targets that match this document.

repeated int32 target_ids = 5;

Parameters
Name Description
index int

The index to set the value at.

value int

The targetIds to set.

Returns
Type Description
DocumentChange.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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