# Cloud Firestore V1 API - Class Google::Cloud::Firestore::V1::TargetChange (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::TargetChange.

Targets being watched have changed.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #cause

    def cause() -> ::Google::Rpc::Status

**Returns**

- ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Rpc-Status)) --- The error that resulted in this change, if applicable.

### #cause=

    def cause=(value) -> ::Google::Rpc::Status

**Parameter**

- **value** ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Rpc-Status)) --- The error that resulted in this change, if applicable.
**Returns**

- ([::Google::Rpc::Status](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Rpc-Status)) --- The error that resulted in this change, if applicable.

### #read_time

    def read_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Protobuf-Timestamp)) --- 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.

### #read_time=

    def read_time=(value) -> ::Google::Protobuf::Timestamp

**Parameter**

- **value** ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Protobuf-Timestamp)) --- 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.
**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Protobuf-Timestamp)) --- 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.

### #resume_token

    def resume_token() -> ::String

**Returns**

- (::String) --- 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.

### #resume_token=

    def resume_token=(value) -> ::String

**Parameter**

- **value** (::String) --- 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.
**Returns**

- (::String) --- 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.

### #target_change_type

    def target_change_type() -> ::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType

**Returns**

- ([::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TargetChange-TargetChangeType)) --- The type of change that occurred.

### #target_change_type=

    def target_change_type=(value) -> ::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType

**Parameter**

- **value** ([::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TargetChange-TargetChangeType)) --- The type of change that occurred.
**Returns**

- ([::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest/Google-Cloud-Firestore-V1-TargetChange-TargetChangeType)) --- The type of change that occurred.

### #target_ids

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

**Returns**

- (::Array\<::Integer\>) --- 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.

### #target_ids=

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

**Parameter**

- **value** (::Array\<::Integer\>) --- 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.
**Returns**

- (::Array\<::Integer\>) --- 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.