# Cloud Firestore V1 API - Class Google::Cloud::Firestore::V1::DocumentChange (v2.4.0)

2.4.0 (latest) 2.3.0 2.2.1 2.1.1 2.0.1 1.3.0 1.2.0 1.1.1 1.0.0 0.14.0 0.13.0 0.12.0 0.11.1 0.10.0 0.9.0 0.8.0 0.7.1 0.6.0 0.5.0 0.4.8 Reference documentation and code samples for the Cloud Firestore V1 API class Google::Cloud::Firestore::V1::DocumentChange.

A [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document "Google::Cloud::Firestore::V1::Document (class)") has changed.


May be the result of multiple [writes](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Write "Google::Cloud::Firestore::V1::Write (class)"), including
deletes, that ultimately resulted in a new value for the
[Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document "Google::Cloud::Firestore::V1::Document (class)").

<br />

Multiple [DocumentChange](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-DocumentChange "Google::Cloud::Firestore::V1::DocumentChange (class)") messages may be
returned for the same logical change, if multiple targets are affected.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #document

    def document() -> ::Google::Cloud::Firestore::V1::Document

**Returns**

- ([::Google::Cloud::Firestore::V1::Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document)) --- The new state of the [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document "Google::Cloud::Firestore::V1::Document (class)").


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

### #document=

    def document=(value) -> ::Google::Cloud::Firestore::V1::Document

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document)) --- The new state of the [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document "Google::Cloud::Firestore::V1::Document (class)").


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

- ([::Google::Cloud::Firestore::V1::Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document)) --- The new state of the [Document](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-Document "Google::Cloud::Firestore::V1::Document (class)").


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

### #removed_target_ids

    def removed_target_ids() -> ::Array<::Integer>

**Returns**

- (::Array\<::Integer\>) --- A set of target IDs for targets that no longer match this document.

### #removed_target_ids=

    def removed_target_ids=(value) -> ::Array<::Integer>

**Parameter**

- **value** (::Array\<::Integer\>) --- A set of target IDs for targets that no longer match this document.
**Returns**

- (::Array\<::Integer\>) --- A set of target IDs for targets that no longer match this document.

### #target_ids

    def target_ids() -> ::Array<::Integer>

**Returns**

- (::Array\<::Integer\>) --- A set of target IDs of targets that match this document.

### #target_ids=

    def target_ids=(value) -> ::Array<::Integer>

**Parameter**

- **value** (::Array\<::Integer\>) --- A set of target IDs of targets that match this document.
**Returns**

- (::Array\<::Integer\>) --- A set of target IDs of targets that match this document.