# Cloud IoT V1 API - Class Google::Cloud::Iot::V1::ListDeviceStatesRequest (v0.9.2)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.9.2 (latest)](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/latest/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.9.1](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.9.1/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.8.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.8.0/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.7.1](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.7.1/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.6.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.6.0/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.5.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.5.0/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.4.0](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.4.0/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
- [0.3.5](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-iot-v1/0.3.5/Google-Cloud-Iot-V1-ListDeviceStatesRequest)
Reference documentation and code samples for the Cloud IoT V1 API class Google::Cloud::Iot::V1::ListDeviceStatesRequest.

Request for `ListDeviceStates`.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #name

    def name() -> ::String

**Returns**

- (::String) --- Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
**Returns**

- (::String) --- Required. The name of the device. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0` or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.

### #num_states

    def num_states() -> ::Integer

**Returns**

- (::Integer) --- The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.

### #num_states=

    def num_states=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.
**Returns**

- (::Integer) --- The number of states to list. States are listed in descending order of update time. The maximum number of states retained is 10. If this value is zero, it will return all the states available.