Package com.google.cloud.iot.v1
Interface DeviceOrBuilder
-
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
Device
,Device.Builder
public interface DeviceOrBuilder extends com.google.protobuf.MessageOrBuilder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description boolean
containsMetadata(String key)
The metadata key-value pairs assigned to the device.boolean
getBlocked()
If a device is blocked, connections or requests from this device will fail.DeviceConfig
getConfig()
The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.DeviceConfigOrBuilder
getConfigOrBuilder()
The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.DeviceCredential
getCredentials(int index)
The credentials used to authenticate this device.int
getCredentialsCount()
The credentials used to authenticate this device.List<DeviceCredential>
getCredentialsList()
The credentials used to authenticate this device.DeviceCredentialOrBuilder
getCredentialsOrBuilder(int index)
The credentials used to authenticate this device.List<? extends DeviceCredentialOrBuilder>
getCredentialsOrBuilderList()
The credentials used to authenticate this device.GatewayConfig
getGatewayConfig()
Gateway-related configuration and state.GatewayConfigOrBuilder
getGatewayConfigOrBuilder()
Gateway-related configuration and state.String
getId()
The user-defined device identifier.com.google.protobuf.ByteString
getIdBytes()
The user-defined device identifier.com.google.protobuf.Timestamp
getLastConfigAckTime()
[Output only] The last time a cloud-to-device config version acknowledgment was received from the device.com.google.protobuf.TimestampOrBuilder
getLastConfigAckTimeOrBuilder()
[Output only] The last time a cloud-to-device config version acknowledgment was received from the device.com.google.protobuf.Timestamp
getLastConfigSendTime()
[Output only] The last time a cloud-to-device config version was sent to the device.com.google.protobuf.TimestampOrBuilder
getLastConfigSendTimeOrBuilder()
[Output only] The last time a cloud-to-device config version was sent to the device.com.google.rpc.Status
getLastErrorStatus()
[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.com.google.rpc.StatusOrBuilder
getLastErrorStatusOrBuilder()
[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.com.google.protobuf.Timestamp
getLastErrorTime()
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.com.google.protobuf.TimestampOrBuilder
getLastErrorTimeOrBuilder()
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.com.google.protobuf.Timestamp
getLastEventTime()
[Output only] The last time a telemetry event was received.com.google.protobuf.TimestampOrBuilder
getLastEventTimeOrBuilder()
[Output only] The last time a telemetry event was received.com.google.protobuf.Timestamp
getLastHeartbeatTime()
[Output only] The last time an MQTT `PINGREQ` was received.com.google.protobuf.TimestampOrBuilder
getLastHeartbeatTimeOrBuilder()
[Output only] The last time an MQTT `PINGREQ` was received.com.google.protobuf.Timestamp
getLastStateTime()
[Output only] The last time a state event was received.com.google.protobuf.TimestampOrBuilder
getLastStateTimeOrBuilder()
[Output only] The last time a state event was received.LogLevel
getLogLevel()
**Beta Feature** The logging verbosity for device activity.int
getLogLevelValue()
**Beta Feature** The logging verbosity for device activity.Map<String,String>
getMetadata()
Deprecated.int
getMetadataCount()
The metadata key-value pairs assigned to the device.Map<String,String>
getMetadataMap()
The metadata key-value pairs assigned to the device.String
getMetadataOrDefault(String key, String defaultValue)
The metadata key-value pairs assigned to the device.String
getMetadataOrThrow(String key)
The metadata key-value pairs assigned to the device.String
getName()
The resource path name.com.google.protobuf.ByteString
getNameBytes()
The resource path name.long
getNumId()
[Output only] A server-defined unique numeric ID for the device.DeviceState
getState()
[Output only] The state most recently received from the device.DeviceStateOrBuilder
getStateOrBuilder()
[Output only] The state most recently received from the device.boolean
hasConfig()
The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.boolean
hasGatewayConfig()
Gateway-related configuration and state.boolean
hasLastConfigAckTime()
[Output only] The last time a cloud-to-device config version acknowledgment was received from the device.boolean
hasLastConfigSendTime()
[Output only] The last time a cloud-to-device config version was sent to the device.boolean
hasLastErrorStatus()
[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.boolean
hasLastErrorTime()
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.boolean
hasLastEventTime()
[Output only] The last time a telemetry event was received.boolean
hasLastHeartbeatTime()
[Output only] The last time an MQTT `PINGREQ` was received.boolean
hasLastStateTime()
[Output only] The last time a state event was received.boolean
hasState()
[Output only] The state most recently received from the device.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getId
String getId()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
- Returns:
- The id.
-
getIdBytes
com.google.protobuf.ByteString getIdBytes()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
- Returns:
- The bytes for id.
-
getName
String getName()
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.
string name = 2;
- Returns:
- The name.
-
getNameBytes
com.google.protobuf.ByteString getNameBytes()
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.
string name = 2;
- Returns:
- The bytes for name.
-
getNumId
long getNumId()
[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.
uint64 num_id = 3;
- Returns:
- The numId.
-
getCredentialsList
List<DeviceCredential> getCredentialsList()
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.
repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
-
getCredentials
DeviceCredential getCredentials(int index)
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.
repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
-
getCredentialsCount
int getCredentialsCount()
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.
repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
-
getCredentialsOrBuilderList
List<? extends DeviceCredentialOrBuilder> getCredentialsOrBuilderList()
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.
repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
-
getCredentialsOrBuilder
DeviceCredentialOrBuilder getCredentialsOrBuilder(int index)
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.
repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;
-
hasLastHeartbeatTime
boolean hasLastHeartbeatTime()
[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.
.google.protobuf.Timestamp last_heartbeat_time = 7;
- Returns:
- Whether the lastHeartbeatTime field is set.
-
getLastHeartbeatTime
com.google.protobuf.Timestamp getLastHeartbeatTime()
[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.
.google.protobuf.Timestamp last_heartbeat_time = 7;
- Returns:
- The lastHeartbeatTime.
-
getLastHeartbeatTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getLastHeartbeatTimeOrBuilder()
[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.
.google.protobuf.Timestamp last_heartbeat_time = 7;
-
hasLastEventTime
boolean hasLastEventTime()
[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.
.google.protobuf.Timestamp last_event_time = 8;
- Returns:
- Whether the lastEventTime field is set.
-
getLastEventTime
com.google.protobuf.Timestamp getLastEventTime()
[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.
.google.protobuf.Timestamp last_event_time = 8;
- Returns:
- The lastEventTime.
-
getLastEventTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getLastEventTimeOrBuilder()
[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.
.google.protobuf.Timestamp last_event_time = 8;
-
hasLastStateTime
boolean hasLastStateTime()
[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.
.google.protobuf.Timestamp last_state_time = 20;
- Returns:
- Whether the lastStateTime field is set.
-
getLastStateTime
com.google.protobuf.Timestamp getLastStateTime()
[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.
.google.protobuf.Timestamp last_state_time = 20;
- Returns:
- The lastStateTime.
-
getLastStateTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getLastStateTimeOrBuilder()
[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.
.google.protobuf.Timestamp last_state_time = 20;
-
hasLastConfigAckTime
boolean hasLastConfigAckTime()
[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.
.google.protobuf.Timestamp last_config_ack_time = 14;
- Returns:
- Whether the lastConfigAckTime field is set.
-
getLastConfigAckTime
com.google.protobuf.Timestamp getLastConfigAckTime()
[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.
.google.protobuf.Timestamp last_config_ack_time = 14;
- Returns:
- The lastConfigAckTime.
-
getLastConfigAckTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getLastConfigAckTimeOrBuilder()
[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.
.google.protobuf.Timestamp last_config_ack_time = 14;
-
hasLastConfigSendTime
boolean hasLastConfigSendTime()
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
- Returns:
- Whether the lastConfigSendTime field is set.
-
getLastConfigSendTime
com.google.protobuf.Timestamp getLastConfigSendTime()
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
- Returns:
- The lastConfigSendTime.
-
getLastConfigSendTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getLastConfigSendTimeOrBuilder()
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
-
getBlocked
boolean getBlocked()
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.
bool blocked = 19;
- Returns:
- The blocked.
-
hasLastErrorTime
boolean hasLastErrorTime()
[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'.
.google.protobuf.Timestamp last_error_time = 10;
- Returns:
- Whether the lastErrorTime field is set.
-
getLastErrorTime
com.google.protobuf.Timestamp getLastErrorTime()
[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'.
.google.protobuf.Timestamp last_error_time = 10;
- Returns:
- The lastErrorTime.
-
getLastErrorTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getLastErrorTimeOrBuilder()
[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'.
.google.protobuf.Timestamp last_error_time = 10;
-
hasLastErrorStatus
boolean hasLastErrorStatus()
[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.
.google.rpc.Status last_error_status = 11;
- Returns:
- Whether the lastErrorStatus field is set.
-
getLastErrorStatus
com.google.rpc.Status getLastErrorStatus()
[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.
.google.rpc.Status last_error_status = 11;
- Returns:
- The lastErrorStatus.
-
getLastErrorStatusOrBuilder
com.google.rpc.StatusOrBuilder getLastErrorStatusOrBuilder()
[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.
.google.rpc.Status last_error_status = 11;
-
hasConfig
boolean hasConfig()
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.
.google.cloud.iot.v1.DeviceConfig config = 13;
- Returns:
- Whether the config field is set.
-
getConfig
DeviceConfig getConfig()
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.
.google.cloud.iot.v1.DeviceConfig config = 13;
- Returns:
- The config.
-
getConfigOrBuilder
DeviceConfigOrBuilder getConfigOrBuilder()
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.
.google.cloud.iot.v1.DeviceConfig config = 13;
-
hasState
boolean hasState()
[Output only] The state most recently received from the device. If no state has been reported, this field is not present.
.google.cloud.iot.v1.DeviceState state = 16;
- Returns:
- Whether the state field is set.
-
getState
DeviceState getState()
[Output only] The state most recently received from the device. If no state has been reported, this field is not present.
.google.cloud.iot.v1.DeviceState state = 16;
- Returns:
- The state.
-
getStateOrBuilder
DeviceStateOrBuilder getStateOrBuilder()
[Output only] The state most recently received from the device. If no state has been reported, this field is not present.
.google.cloud.iot.v1.DeviceState state = 16;
-
getLogLevelValue
int getLogLevelValue()
**Beta Feature** The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used.
.google.cloud.iot.v1.LogLevel log_level = 21;
- Returns:
- The enum numeric value on the wire for logLevel.
-
getLogLevel
LogLevel getLogLevel()
**Beta Feature** The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used.
.google.cloud.iot.v1.LogLevel log_level = 21;
- Returns:
- The logLevel.
-
getMetadataCount
int getMetadataCount()
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.
map<string, string> metadata = 17;
-
containsMetadata
boolean containsMetadata(String key)
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.
map<string, string> metadata = 17;
-
getMetadata
@Deprecated Map<String,String> getMetadata()
Deprecated.UsegetMetadataMap()
instead.
-
getMetadataMap
Map<String,String> getMetadataMap()
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.
map<string, string> metadata = 17;
-
getMetadataOrDefault
String getMetadataOrDefault(String key, String defaultValue)
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.
map<string, string> metadata = 17;
-
getMetadataOrThrow
String getMetadataOrThrow(String key)
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.
map<string, string> metadata = 17;
-
hasGatewayConfig
boolean hasGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
- Returns:
- Whether the gatewayConfig field is set.
-
getGatewayConfig
GatewayConfig getGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
- Returns:
- The gatewayConfig.
-
getGatewayConfigOrBuilder
GatewayConfigOrBuilder getGatewayConfigOrBuilder()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
-
-