Class DocumentChange.Builder (3.2.0)

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
TypeDescription
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
NameDescription
valuesIterable<? extends java.lang.Integer>

The removedTargetIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<? extends java.lang.Integer>

The targetIds to add.

Returns
TypeDescription
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
NameDescription
valueint

The removedTargetIds to add.

Returns
TypeDescription
DocumentChange.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DocumentChange.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The targetIds to add.

Returns
TypeDescription
DocumentChange.Builder

This builder for chaining.

build()

public DocumentChange build()
Returns
TypeDescription
DocumentChange

buildPartial()

public DocumentChange buildPartial()
Returns
TypeDescription
DocumentChange

clear()

public DocumentChange.Builder clear()
Returns
TypeDescription
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
TypeDescription
DocumentChange.Builder

clearField(Descriptors.FieldDescriptor field)

public DocumentChange.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
DocumentChange.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public DocumentChange.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
DocumentChange.Builder

This builder for chaining.

clone()

public DocumentChange.Builder clone()
Returns
TypeDescription
DocumentChange.Builder
Overrides

getDefaultInstanceForType()

public DocumentChange getDefaultInstanceForType()
Returns
TypeDescription
DocumentChange

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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
NameDescription
valueDocument
Returns
TypeDescription
DocumentChange.Builder

mergeFrom(DocumentChange other)

public DocumentChange.Builder mergeFrom(DocumentChange other)
Parameter
NameDescription
otherDocumentChange
Returns
TypeDescription
DocumentChange.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DocumentChange.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DocumentChange.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public DocumentChange.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
DocumentChange.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DocumentChange.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueDocument
Returns
TypeDescription
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
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
DocumentChange.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public DocumentChange.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueint

The removedTargetIds to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueint

The targetIds to set.

Returns
TypeDescription
DocumentChange.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final DocumentChange.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DocumentChange.Builder
Overrides