NAME

Google::Cloud::Iot::V1::Resources - Compiled Protocol Buffers messages for google/cloud/iot/v1/resources.proto

SYNOPSIS

use Google::Cloud::Iot::V1::Resources;

my $msg = Google::Cloud::Iot::V1::Resources::Device->new({
    id => $id,
    name => $name,
    num_id => $num_id,
    credentials => $credentials,
});

# Read or update a field
my $val = $msg->id();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Iot::V1::Resources::Device->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/iot/v1/resources.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::Resources::Device

The device resource.

Inherits from Protobuf::Message.

Accessors

  • $msg->id() / $msg->id($value)

    Type: String

    The user-defined device identifier. The device ID must be unique within a device registry.

  • $msg->name() / $msg->name($value)

    Type: String

    The resource path name. For example, `projects/p1/locations/us-central1/registries/registry0/devices/dev0` or `projects/p1/locations/us-central1/registries/registry0/devices/{num_id}`. When `name` is populated as a response from the service, it always ends in the device numeric ID.

  • $msg->num_id() / $msg->num_id($value)

    Type: UInt64

    [Output only] A server-defined unique numeric ID for the device. This is a more compact way to identify devices, and it is globally unique.

  • $msg->credentials() / $msg->credentials($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::DeviceCredential)

    The credentials used to authenticate this device. To allow credential rotation without interruption, multiple device credentials can be bound to this device. No more than 3 credentials can be bound to a single device at a time. When new credentials are added to a device, they are verified against the registry credentials. For details, see the description of the `DeviceRegistry.credentials` field.

  • $msg->last_heartbeat_time() / $msg->last_heartbeat_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The last time an MQTT `PINGREQ` was received. This field applies only to devices connecting through MQTT. MQTT clients usually only send `PINGREQ` messages if the connection is idle, and no other messages have been sent. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.

  • $msg->last_event_time() / $msg->last_event_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The last time a telemetry event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.

  • $msg->last_state_time() / $msg->last_state_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The last time a state event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.

  • $msg->last_config_ack_time() / $msg->last_config_ack_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The last time a cloud-to-device config version acknowledgment was received from the device. This field is only for configurations sent through MQTT.

  • $msg->last_config_send_time() / $msg->last_config_send_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The last time a cloud-to-device config version was sent to the device.

  • $msg->blocked() / $msg->blocked($value)

    Type: Bool

    If a device is blocked, connections or requests from this device will fail. Can be used to temporarily prevent the device from connecting if, for example, the sensor is generating bad data and needs maintenance.

  • $msg->last_error_time() / $msg->last_error_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub. This field is the timestamp of 'last_error_status'.

  • $msg->last_error_status() / $msg->last_error_status($value)

    Type: Message (Google::Rpc::Status::Status)

    [Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this field. If no errors have occurred, this field has an empty message and the status code 0 == OK. Otherwise, this field is expected to have a status code other than OK.

  • $msg->config() / $msg->config($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::DeviceConfig)

    The most recent device configuration, which is eventually sent from Cloud IoT Core to the device. If not present on creation, the configuration will be initialized with an empty payload and version value of `1`. To update this field after creation, use the `DeviceManager.ModifyCloudToDeviceConfig` method.

  • $msg->state() / $msg->state($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::DeviceState)

    [Output only] The state most recently received from the device. If no state has been reported, this field is not present.

  • $msg->log_level() / $msg->log_level($value)

    Type: Enum (Google::Cloud::Iot::V1::LogLevel)

    Beta Feature

    The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used.

  • $msg->metadata() / $msg->metadata($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::Device::MetadataEntry)

    The metadata key-value pairs assigned to the device. This metadata is not interpreted or indexed by Cloud IoT Core. It can be used to add contextual information for the device.

    Keys must conform to the regular expression [a-zA-Z][a-zA-Z0-9-_.+~%]+ and be less than 128 bytes in length.

    Values are free-form strings. Each value must be less than or equal to 32 KB in size.

    The total size of all keys and values must be less than 256 KB, and the maximum number of key-value pairs is 500.

  • $msg->gateway_config() / $msg->gateway_config($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::GatewayConfig)

    Gateway-related configuration and state.

Google::Cloud::Iot::V1::Resources::GatewayConfig

Gateway-related configuration and state.

Inherits from Protobuf::Message.

Accessors

  • $msg->gateway_type() / $msg->gateway_type($value)

    Type: Enum (Google::Cloud::Iot::V1::GatewayType)

    Indicates whether the device is a gateway.

  • $msg->gateway_auth_method() / $msg->gateway_auth_method($value)

    Type: Enum (Google::Cloud::Iot::V1::GatewayAuthMethod)

    Indicates how to authorize and/or authenticate devices to access the gateway.

  • $msg->last_accessed_gateway_id() / $msg->last_accessed_gateway_id($value)

    Type: String

    [Output only] The ID of the gateway the device accessed most recently.

  • $msg->last_accessed_gateway_time() / $msg->last_accessed_gateway_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The most recent time at which the device accessed the gateway specified in `last_accessed_gateway`.

Google::Cloud::Iot::V1::Resources::DeviceRegistry

A container for a group of devices.

Inherits from Protobuf::Message.

Accessors

  • $msg->id() / $msg->id($value)

    Type: String

    The identifier of this device registry. For example, `myRegistry`.

  • $msg->name() / $msg->name($value)

    Type: String

    The resource path name. For example, `projects/example-project/locations/us-central1/registries/my-registry`.

  • $msg->event_notification_configs() / $msg->event_notification_configs($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::EventNotificationConfig)

    The configuration for notification of telemetry events received from the device. All telemetry events that were successfully published by the device and acknowledged by Cloud IoT Core are guaranteed to be delivered to Cloud Pub/Sub. If multiple configurations match a message, only the first matching configuration is used. If you try to publish a device telemetry event using MQTT without specifying a Cloud Pub/Sub topic for the device's registry, the connection closes automatically. If you try to do so using an HTTP connection, an error is returned. Up to 10 configurations may be provided.

  • $msg->state_notification_config() / $msg->state_notification_config($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::StateNotificationConfig)

    The configuration for notification of new states received from the device. State updates are guaranteed to be stored in the state history, but notifications to Cloud Pub/Sub are not guaranteed. For example, if permissions are misconfigured or the specified topic doesn't exist, no notification will be published but the state will still be stored in Cloud IoT Core.

  • $msg->mqtt_config() / $msg->mqtt_config($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::MqttConfig)

    The MQTT configuration for this device registry.

  • $msg->http_config() / $msg->http_config($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::HttpConfig)

    The DeviceService (HTTP) configuration for this device registry.

  • $msg->log_level() / $msg->log_level($value)

    Type: Enum (Google::Cloud::Iot::V1::LogLevel)

    Beta Feature

    The default logging verbosity for activity from devices in this registry. The verbosity level can be overridden by Device.log_level.

  • $msg->credentials() / $msg->credentials($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::RegistryCredential)

    The credentials used to verify the device credentials. No more than 10 credentials can be bound to a single registry at a time. The verification process occurs at the time of device creation or update. If this field is empty, no verification is performed. Otherwise, the credentials of a newly created device or added credentials of an updated device should be signed with one of these registry credentials.

    Note, however, that existing devices will never be affected by modifications to this list of credentials: after a device has been successfully created in a registry, it should be able to connect even if its registry credentials are revoked, deleted, or modified.

Google::Cloud::Iot::V1::Resources::MqttConfig

The configuration of MQTT for a device registry.

Inherits from Protobuf::Message.

Accessors

  • $msg->mqtt_enabled_state() / $msg->mqtt_enabled_state($value)

    Type: Enum (Google::Cloud::Iot::V1::MqttState)

    If enabled, allows connections using the MQTT protocol. Otherwise, MQTT connections to this registry will fail.

Google::Cloud::Iot::V1::Resources::HttpConfig

The configuration of the HTTP bridge for a device registry.

Inherits from Protobuf::Message.

Accessors

  • $msg->http_enabled_state() / $msg->http_enabled_state($value)

    Type: Enum (Google::Cloud::Iot::V1::HttpState)

    If enabled, allows devices to use DeviceService via the HTTP protocol. Otherwise, any requests to DeviceService will fail for this registry.

Google::Cloud::Iot::V1::Resources::EventNotificationConfig

The configuration for forwarding telemetry events.

Inherits from Protobuf::Message.

Accessors

  • $msg->subfolder_matches() / $msg->subfolder_matches($value)

    Type: String

    If the subfolder name matches this string exactly, this configuration will be used. The string must not include the leading '/' character. If empty, all strings are matched. This field is used only for telemetry events; subfolders are not supported for state changes.

  • $msg->pubsub_topic_name() / $msg->pubsub_topic_name($value)

    Type: String

    A Cloud Pub/Sub topic name. For example, `projects/myProject/topics/deviceEvents`.

Google::Cloud::Iot::V1::Resources::StateNotificationConfig

The configuration for notification of new states received from the device.

Inherits from Protobuf::Message.

Accessors

  • $msg->pubsub_topic_name() / $msg->pubsub_topic_name($value)

    Type: String

    A Cloud Pub/Sub topic name. For example, `projects/myProject/topics/deviceEvents`.

Google::Cloud::Iot::V1::Resources::RegistryCredential

A server-stored registry credential used to validate device credentials.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Iot::V1::Resources::X509CertificateDetails

Details of an X.509 certificate. For informational purposes only.

Inherits from Protobuf::Message.

Accessors

  • $msg->issuer() / $msg->issuer($value)

    Type: String

    The entity that signed the certificate.

  • $msg->subject() / $msg->subject($value)

    Type: String

    The entity the certificate and public key belong to.

  • $msg->start_time() / $msg->start_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The time the certificate becomes valid.

  • $msg->expiry_time() / $msg->expiry_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The time the certificate becomes invalid.

  • $msg->signature_algorithm() / $msg->signature_algorithm($value)

    Type: String

    The algorithm used to sign the certificate.

  • $msg->public_key_type() / $msg->public_key_type($value)

    Type: String

    The type of public key in the certificate.

Google::Cloud::Iot::V1::Resources::PublicKeyCertificate

A public key certificate format and data.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Iot::V1::Resources::DeviceCredential

A server-stored device credential used for authentication.

Inherits from Protobuf::Message.

Accessors

  • $msg->public_key() / $msg->public_key($value)

    Type: Message (Google::Cloud::Iot::V1::Resources::PublicKeyCredential)

    A public key used to verify the signature of JSON Web Tokens (JWTs). When adding a new device credential, either via device creation or via modifications, this public key credential may be required to be signed by one of the registry level certificates. More specifically, if the registry contains at least one certificate, any new device credential must be signed by one of the registry certificates. As a result, when the registry contains certificates, only X.509 certificates are accepted as device credentials. However, if the registry does not contain a certificate, self-signed certificates and public keys will be accepted. New device credentials must be different from every registry-level certificate.

  • $msg->expiration_time() / $msg->expiration_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Optional] The time at which this credential becomes invalid. This credential will be ignored for new client authentication requests after this timestamp; however, it will not be automatically deleted.

Google::Cloud::Iot::V1::Resources::PublicKeyCredential

A public key format and data.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Iot::V1::Resources::DeviceConfig

The device configuration. Eventually delivered to devices.

Inherits from Protobuf::Message.

Accessors

  • $msg->version() / $msg->version($value)

    Type: Int64

    [Output only] The version of this update. The version number is assigned by the server, and is always greater than 0 after device creation. The version must be 0 on the `CreateDevice` request if a `config` is specified; the response of `CreateDevice` will always have a value of 1.

  • $msg->cloud_update_time() / $msg->cloud_update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The time at which this configuration version was updated in Cloud IoT Core. This timestamp is set by the server.

  • $msg->device_ack_time() / $msg->device_ack_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The time at which Cloud IoT Core received the acknowledgment from the device, indicating that the device has received this configuration version. If this field is not present, the device has not yet acknowledged that it received this version. Note that when the config was sent to the device, many config versions may have been available in Cloud IoT Core while the device was disconnected, and on connection, only the latest version is sent to the device. Some versions may never be sent to the device, and therefore are never acknowledged. This timestamp is set by Cloud IoT Core.

  • $msg->binary_data() / $msg->binary_data($value)

    Type: Bytes

    The device configuration data.

Google::Cloud::Iot::V1::Resources::DeviceState

The device state, as reported by the device.

Inherits from Protobuf::Message.

Accessors

  • $msg->update_time() / $msg->update_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    [Output only] The time at which this state version was updated in Cloud IoT Core.

  • $msg->binary_data() / $msg->binary_data($value)

    Type: Bytes

    The device state data.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Iot::V1::Resources::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.