Service Client: Google::Cloud::Iot::V1::DeviceManager::DeviceManagerClient
Client stub representing the remote DeviceManager gRPC service. Delegates call dispatching to Google::gRPC::Client.
target
The endpoint target address. Defaults to iot.googleapis.com:443.
credentials
The authentication credentials provider. Defaults to application default credentials via Google::Auth.
NAME
Google::Cloud::Iot::V1::DeviceManager - Compiled Protocol Buffers messages for google/cloud/iot/v1/device_manager.proto
SYNOPSIS
use Google::Cloud::Iot::V1::DeviceManager;
my $msg = Google::Cloud::Iot::V1::DeviceManager::CreateDeviceRegistryRequest->new({
parent => $parent,
device_registry => $device_registry,
});
# Read or update a field
my $val = $msg->parent();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Iot::V1::DeviceManager::CreateDeviceRegistryRequest->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/iot/v1/device_manager.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Iot::V1::DeviceManager::CreateDeviceRegistryRequest
Request for `CreateDeviceRegistry`.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and cloud region where this device registry must be created. For example, `projects/example-project/locations/us-central1`.
$msg->device_registry()/$msg->device_registry($value)Type:
Message(Google::Cloud::Iot::V1::Resources::DeviceRegistry)Required. The device registry. The field `name` must be empty. The server will generate that field from the device registry `id` provided and the `parent` field.
Google::Cloud::Iot::V1::DeviceManager::GetDeviceRegistryRequest
Request for `GetDeviceRegistry`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`.
Google::Cloud::Iot::V1::DeviceManager::DeleteDeviceRegistryRequest
Request for `DeleteDeviceRegistry`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. The name of the device registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`.
Google::Cloud::Iot::V1::DeviceManager::UpdateDeviceRegistryRequest
Request for `UpdateDeviceRegistry`.
Inherits from Protobuf::Message.
Accessors
$msg->device_registry()/$msg->device_registry($value)Type:
Message(Google::Cloud::Iot::V1::Resources::DeviceRegistry)Required. The new values for the device registry. The `id` field must be empty, and the `name` field must indicate the path of the resource. For example, `projects/example-project/locations/us-central1/registries/my-registry`.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Required. Only updates the `device_registry` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `event_notification_config`, `http_config`, `mqtt_config`, and `state_notification_config`.
Google::Cloud::Iot::V1::DeviceManager::ListDeviceRegistriesRequest
Request for `ListDeviceRegistries`.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The project and cloud region path. For example, `projects/example-project/locations/us-central1`.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of registries to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty `next_page_token` in the response indicates that more data is available.
$msg->page_token()/$msg->page_token($value)Type:
StringThe value returned by the last `ListDeviceRegistriesResponse`; indicates that this is a continuation of a prior `ListDeviceRegistries` call and the system should return the next page of data.
Google::Cloud::Iot::V1::DeviceManager::ListDeviceRegistriesResponse
Response for `ListDeviceRegistries`.
Inherits from Protobuf::Message.
Accessors
$msg->device_registries()/$msg->device_registries($value)Type:
Message(Google::Cloud::Iot::V1::Resources::DeviceRegistry)The registries that matched the query.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringIf not empty, indicates that there may be more registries that match the request; this value should be passed in a new `ListDeviceRegistriesRequest`.
Google::Cloud::Iot::V1::DeviceManager::CreateDeviceRequest
Request for `CreateDevice`.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the device registry where this device should be created. For example, `projects/example-project/locations/us-central1/registries/my-registry`.
$msg->device()/$msg->device($value)Type:
Message(Google::Cloud::Iot::V1::Resources::Device)Required. The device registration details. The field `name` must be empty. The server generates `name` from the device registry `id` and the `parent` field.
Google::Cloud::Iot::V1::DeviceManager::GetDeviceRequest
Request for `GetDevice`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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}`.
$msg->field_mask()/$msg->field_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The fields of the `Device` resource to be returned in the response. If the field mask is unset or empty, all fields are returned. Fields have to be provided in snake_case format, for example: `last_heartbeat_time`.
Google::Cloud::Iot::V1::DeviceManager::UpdateDeviceRequest
Request for `UpdateDevice`.
Inherits from Protobuf::Message.
Accessors
$msg->device()/$msg->device($value)Type:
Message(Google::Cloud::Iot::V1::Resources::Device)Required. The new values for the device. The `id` and `num_id` fields must be empty, and the field `name` must specify the name path. For example, `projects/p0/locations/us-central1/registries/registry0/devices/device0`or `projects/p0/locations/us-central1/registries/registry0/devices/{num_id}`.
$msg->update_mask()/$msg->update_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)Required. Only updates the `device` fields indicated by this mask. The field mask must not be empty, and it must not contain fields that are immutable or only set by the server. Mutable top-level fields: `credentials`, `blocked`, and `metadata`
Google::Cloud::Iot::V1::DeviceManager::DeleteDeviceRequest
Request for `DeleteDevice`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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}`.
Google::Cloud::Iot::V1::DeviceManager::ListDevicesRequest
Request for `ListDevices`.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The device registry path. Required. For example, `projects/my-project/locations/us-central1/registries/my-registry`.
$msg->device_num_ids()/$msg->device_num_ids($value)Type:
UInt64A list of device numeric IDs. If empty, this field is ignored. Maximum IDs: 10,000.
$msg->device_ids()/$msg->device_ids($value)Type:
StringA list of device string IDs. For example, `['device0', 'device12']`. If empty, this field is ignored. Maximum IDs: 10,000
$msg->field_mask()/$msg->field_mask($value)Type:
Message(Google::Protobuf::FieldMask::FieldMask)The fields of the `Device` resource to be returned in the response. The fields `id` and `num_id` are always returned, along with any other fields specified in snake_case format, for example: `last_heartbeat_time`.
$msg->gateway_list_options()/$msg->gateway_list_options($value)Type:
Message(Google::Cloud::Iot::V1::DeviceManager::GatewayListOptions)Options related to gateways.
$msg->page_size()/$msg->page_size($value)Type:
Int32The maximum number of devices to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty `next_page_token` in the response indicates that more data is available.
$msg->page_token()/$msg->page_token($value)Type:
StringThe value returned by the last `ListDevicesResponse`; indicates that this is a continuation of a prior `ListDevices` call and the system should return the next page of data.
Google::Cloud::Iot::V1::DeviceManager::GatewayListOptions
Options for limiting the list based on gateway type and associations.
Inherits from Protobuf::Message.
Accessors
$msg->gateway_type()/$msg->gateway_type($value)Type:
Enum(Google::Cloud::Iot::V1::GatewayType)If `GATEWAY` is specified, only gateways are returned. If `NON_GATEWAY` is specified, only non-gateway devices are returned. If `GATEWAY_TYPE_UNSPECIFIED` is specified, all devices are returned.
$msg->associations_gateway_id()/$msg->associations_gateway_id($value)Type:
StringIf set, only devices associated with the specified gateway are returned. The gateway ID can be numeric (`num_id`) or the user-defined string (`id`). For example, if `123` is specified, only devices bound to the gateway with `num_id` 123 are returned.
$msg->associations_device_id()/$msg->associations_device_id($value)Type:
StringIf set, returns only the gateways with which the specified device is associated. The device ID can be numeric (`num_id`) or the user-defined string (`id`). For example, if `456` is specified, returns only the gateways to which the device with `num_id` 456 is bound.
Google::Cloud::Iot::V1::DeviceManager::ListDevicesResponse
Response for `ListDevices`.
Inherits from Protobuf::Message.
Accessors
$msg->devices()/$msg->devices($value)Type:
Message(Google::Cloud::Iot::V1::Resources::Device)The devices that match the request.
$msg->next_page_token()/$msg->next_page_token($value)Type:
StringIf not empty, indicates that there may be more devices that match the request; this value should be passed in a new `ListDevicesRequest`.
Google::Cloud::Iot::V1::DeviceManager::ModifyCloudToDeviceConfigRequest
Request for `ModifyCloudToDeviceConfig`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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}`.
$msg->version_to_update()/$msg->version_to_update($value)Type:
Int64The version number to update. If this value is zero, it will not check the version number of the server and will always update the current version; otherwise, this update will fail if the version number found on the server does not match this version number. This is used to support multiple simultaneous updates without losing data.
$msg->binary_data()/$msg->binary_data($value)Type:
BytesRequired. The configuration data for the device.
Google::Cloud::Iot::V1::DeviceManager::ListDeviceConfigVersionsRequest
Request for `ListDeviceConfigVersions`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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}`.
$msg->num_versions()/$msg->num_versions($value)Type:
Int32The number of versions to list. Versions are listed in decreasing order of the version number. The maximum number of versions retained is 10. If this value is zero, it will return all the versions available.
Google::Cloud::Iot::V1::DeviceManager::ListDeviceConfigVersionsResponse
Response for `ListDeviceConfigVersions`.
Inherits from Protobuf::Message.
Accessors
$msg->device_configs()/$msg->device_configs($value)Type:
Message(Google::Cloud::Iot::V1::Resources::DeviceConfig)The device configuration for the last few versions. Versions are listed in decreasing order, starting from the most recent one.
Google::Cloud::Iot::V1::DeviceManager::ListDeviceStatesRequest
Request for `ListDeviceStates`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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}`.
$msg->num_states()/$msg->num_states($value)Type:
Int32The 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.
Google::Cloud::Iot::V1::DeviceManager::ListDeviceStatesResponse
Response for `ListDeviceStates`.
Inherits from Protobuf::Message.
Accessors
$msg->device_states()/$msg->device_states($value)Type:
Message(Google::Cloud::Iot::V1::Resources::DeviceState)The last few device states. States are listed in descending order of server update time, starting from the most recent one.
Google::Cloud::Iot::V1::DeviceManager::SendCommandToDeviceRequest
Request for `SendCommandToDevice`.
Inherits from Protobuf::Message.
Accessors
$msg->name()/$msg->name($value)Type:
StringRequired. 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}`.
$msg->binary_data()/$msg->binary_data($value)Type:
BytesRequired. The command data to send to the device.
$msg->subfolder()/$msg->subfolder($value)Type:
StringOptional subfolder for the command. If empty, the command will be delivered to the /devices/{device-id}/commands topic, otherwise it will be delivered to the /devices/{device-id}/commands/{subfolder} topic. Multi-level subfolders are allowed. This field must not have more than 256 characters, and must not contain any MQTT wildcards ("+" or "#") or null characters.
Google::Cloud::Iot::V1::DeviceManager::SendCommandToDeviceResponse
Response for `SendCommandToDevice`.
Inherits from Protobuf::Message.
Google::Cloud::Iot::V1::DeviceManager::BindDeviceToGatewayRequest
Request for `BindDeviceToGateway`.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`.
$msg->gateway_id()/$msg->gateway_id($value)Type:
StringRequired. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier.
$msg->device_id()/$msg->device_id($value)Type:
StringRequired. The device to associate with the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier.
Google::Cloud::Iot::V1::DeviceManager::BindDeviceToGatewayResponse
Response for `BindDeviceToGateway`.
Inherits from Protobuf::Message.
Google::Cloud::Iot::V1::DeviceManager::UnbindDeviceFromGatewayRequest
Request for `UnbindDeviceFromGateway`.
Inherits from Protobuf::Message.
Accessors
$msg->parent()/$msg->parent($value)Type:
StringRequired. The name of the registry. For example, `projects/example-project/locations/us-central1/registries/my-registry`.
$msg->gateway_id()/$msg->gateway_id($value)Type:
StringRequired. The value of `gateway_id` can be either the device numeric ID or the user-defined device identifier.
$msg->device_id()/$msg->device_id($value)Type:
StringRequired. The device to disassociate from the specified gateway. The value of `device_id` can be either the device numeric ID or the user-defined device identifier.
Google::Cloud::Iot::V1::DeviceManager::UnbindDeviceFromGatewayResponse
Response for `UnbindDeviceFromGateway`.
Inherits from Protobuf::Message.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Iot::V1::DeviceManager::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.