public final class Device
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud IoT API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Device() |
| Modifier and Type | Method and Description |
|---|---|
Device |
clone() |
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.
|
List<DeviceCredential> |
getCredentials()
The credentials used to authenticate this device.
|
GatewayConfig |
getGatewayConfig()
Gateway-related configuration and state.
|
String |
getId()
The user-defined device identifier.
|
String |
getLastConfigAckTime()
[Output only] The last time a cloud-to-device config version acknowledgment was received from
the device.
|
String |
getLastConfigSendTime()
[Output only] The last time a cloud-to-device config version was sent to the device.
|
Status |
getLastErrorStatus()
[Output only] The error message of the most recent error, such as a failure to publish to Cloud
Pub/Sub.
|
String |
getLastErrorTime()
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud
Pub/Sub.
|
String |
getLastEventTime()
[Output only] The last time a telemetry event was received.
|
String |
getLastHeartbeatTime()
[Output only] The last time an MQTT `PINGREQ` was received.
|
String |
getLastStateTime()
[Output only] The last time a state event was received.
|
String |
getLogLevel()
**Beta Feature** The logging verbosity for device activity.
|
Map<String,String> |
getMetadata()
The metadata key-value pairs assigned to the device.
|
String |
getName()
The resource path name.
|
BigInteger |
getNumId()
[Output only] A server-defined unique numeric ID for the device.
|
DeviceState |
getState()
[Output only] The state most recently received from the device.
|
Device |
set(String fieldName,
Object value) |
Device |
setBlocked(Boolean blocked)
If a device is blocked, connections or requests from this device will fail.
|
Device |
setConfig(DeviceConfig config)
The most recent device configuration, which is eventually sent from Cloud IoT Core to the
device.
|
Device |
setCredentials(List<DeviceCredential> credentials)
The credentials used to authenticate this device.
|
Device |
setGatewayConfig(GatewayConfig gatewayConfig)
Gateway-related configuration and state.
|
Device |
setId(String id)
The user-defined device identifier.
|
Device |
setLastConfigAckTime(String lastConfigAckTime)
[Output only] The last time a cloud-to-device config version acknowledgment was received from
the device.
|
Device |
setLastConfigSendTime(String lastConfigSendTime)
[Output only] The last time a cloud-to-device config version was sent to the device.
|
Device |
setLastErrorStatus(Status lastErrorStatus)
[Output only] The error message of the most recent error, such as a failure to publish to Cloud
Pub/Sub.
|
Device |
setLastErrorTime(String lastErrorTime)
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud
Pub/Sub.
|
Device |
setLastEventTime(String lastEventTime)
[Output only] The last time a telemetry event was received.
|
Device |
setLastHeartbeatTime(String lastHeartbeatTime)
[Output only] The last time an MQTT `PINGREQ` was received.
|
Device |
setLastStateTime(String lastStateTime)
[Output only] The last time a state event was received.
|
Device |
setLogLevel(String logLevel)
**Beta Feature** The logging verbosity for device activity.
|
Device |
setMetadata(Map<String,String> metadata)
The metadata key-value pairs assigned to the device.
|
Device |
setName(String name)
The resource path name.
|
Device |
setNumId(BigInteger numId)
[Output only] A server-defined unique numeric ID for the device.
|
Device |
setState(DeviceState state)
[Output only] The state most recently received from the device.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Boolean getBlocked()
null for nonepublic Device setBlocked(Boolean blocked)
blocked - blocked or null for nonepublic DeviceConfig getConfig()
null for nonepublic Device setConfig(DeviceConfig config)
config - config or null for nonepublic List<DeviceCredential> getCredentials()
null for nonepublic Device setCredentials(List<DeviceCredential> credentials)
credentials - credentials or null for nonepublic GatewayConfig getGatewayConfig()
null for nonepublic Device setGatewayConfig(GatewayConfig gatewayConfig)
gatewayConfig - gatewayConfig or null for nonepublic String getId()
null for nonepublic Device setId(String id)
id - id or null for nonepublic String getLastConfigAckTime()
null for nonepublic Device setLastConfigAckTime(String lastConfigAckTime)
lastConfigAckTime - lastConfigAckTime or null for nonepublic String getLastConfigSendTime()
null for nonepublic Device setLastConfigSendTime(String lastConfigSendTime)
lastConfigSendTime - lastConfigSendTime or null for nonepublic Status getLastErrorStatus()
null for nonepublic Device setLastErrorStatus(Status lastErrorStatus)
lastErrorStatus - lastErrorStatus or null for nonepublic String getLastErrorTime()
null for nonepublic Device setLastErrorTime(String lastErrorTime)
lastErrorTime - lastErrorTime or null for nonepublic String getLastEventTime()
null for nonepublic Device setLastEventTime(String lastEventTime)
lastEventTime - lastEventTime or null for nonepublic String getLastHeartbeatTime()
null for nonepublic Device setLastHeartbeatTime(String lastHeartbeatTime)
lastHeartbeatTime - lastHeartbeatTime or null for nonepublic String getLastStateTime()
null for nonepublic Device setLastStateTime(String lastStateTime)
lastStateTime - lastStateTime or null for nonepublic String getLogLevel()
null for nonepublic Device setLogLevel(String logLevel)
logLevel - logLevel or null for nonepublic Map<String,String> getMetadata()
null for nonepublic Device setMetadata(Map<String,String> metadata)
metadata - metadata or null for nonepublic String getName()
null for nonepublic Device setName(String name)
name - name or null for nonepublic BigInteger getNumId()
null for nonepublic Device setNumId(BigInteger numId)
numId - numId or null for nonepublic DeviceState getState()
null for nonepublic Device setState(DeviceState state)
state - state or null for nonepublic Device set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic Device clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2023 Google. All rights reserved.