Package com.google.cloud.iot.v1
Class Device
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.iot.v1.Device
-
- All Implemented Interfaces:
DeviceOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class Device extends com.google.protobuf.GeneratedMessageV3 implements DeviceOrBuilder
The device resource.
Protobuf typegoogle.cloud.iot.v1.Device- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDevice.BuilderThe device resource.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intBLOCKED_FIELD_NUMBERstatic intCONFIG_FIELD_NUMBERstatic intCREDENTIALS_FIELD_NUMBERstatic intGATEWAY_CONFIG_FIELD_NUMBERstatic intID_FIELD_NUMBERstatic intLAST_CONFIG_ACK_TIME_FIELD_NUMBERstatic intLAST_CONFIG_SEND_TIME_FIELD_NUMBERstatic intLAST_ERROR_STATUS_FIELD_NUMBERstatic intLAST_ERROR_TIME_FIELD_NUMBERstatic intLAST_EVENT_TIME_FIELD_NUMBERstatic intLAST_HEARTBEAT_TIME_FIELD_NUMBERstatic intLAST_STATE_TIME_FIELD_NUMBERstatic intLOG_LEVEL_FIELD_NUMBERstatic intMETADATA_FIELD_NUMBERstatic intNAME_FIELD_NUMBERstatic intNUM_ID_FIELD_NUMBERstatic intSTATE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancontainsMetadata(String key)The metadata key-value pairs assigned to the device.booleanequals(Object obj)booleangetBlocked()If a device is blocked, connections or requests from this device will fail.DeviceConfiggetConfig()The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.DeviceConfigOrBuildergetConfigOrBuilder()The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.DeviceCredentialgetCredentials(int index)The credentials used to authenticate this device.intgetCredentialsCount()The credentials used to authenticate this device.List<DeviceCredential>getCredentialsList()The credentials used to authenticate this device.DeviceCredentialOrBuildergetCredentialsOrBuilder(int index)The credentials used to authenticate this device.List<? extends DeviceCredentialOrBuilder>getCredentialsOrBuilderList()The credentials used to authenticate this device.static DevicegetDefaultInstance()DevicegetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()GatewayConfiggetGatewayConfig()Gateway-related configuration and state.GatewayConfigOrBuildergetGatewayConfigOrBuilder()Gateway-related configuration and state.StringgetId()The user-defined device identifier.com.google.protobuf.ByteStringgetIdBytes()The user-defined device identifier.com.google.protobuf.TimestampgetLastConfigAckTime()[Output only] The last time a cloud-to-device config version acknowledgment was received from the device.com.google.protobuf.TimestampOrBuildergetLastConfigAckTimeOrBuilder()[Output only] The last time a cloud-to-device config version acknowledgment was received from the device.com.google.protobuf.TimestampgetLastConfigSendTime()[Output only] The last time a cloud-to-device config version was sent to the device.com.google.protobuf.TimestampOrBuildergetLastConfigSendTimeOrBuilder()[Output only] The last time a cloud-to-device config version was sent to the device.com.google.rpc.StatusgetLastErrorStatus()[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.com.google.rpc.StatusOrBuildergetLastErrorStatusOrBuilder()[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.com.google.protobuf.TimestampgetLastErrorTime()[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.com.google.protobuf.TimestampOrBuildergetLastErrorTimeOrBuilder()[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.com.google.protobuf.TimestampgetLastEventTime()[Output only] The last time a telemetry event was received.com.google.protobuf.TimestampOrBuildergetLastEventTimeOrBuilder()[Output only] The last time a telemetry event was received.com.google.protobuf.TimestampgetLastHeartbeatTime()[Output only] The last time an MQTT `PINGREQ` was received.com.google.protobuf.TimestampOrBuildergetLastHeartbeatTimeOrBuilder()[Output only] The last time an MQTT `PINGREQ` was received.com.google.protobuf.TimestampgetLastStateTime()[Output only] The last time a state event was received.com.google.protobuf.TimestampOrBuildergetLastStateTimeOrBuilder()[Output only] The last time a state event was received.LogLevelgetLogLevel()**Beta Feature** The logging verbosity for device activity.intgetLogLevelValue()**Beta Feature** The logging verbosity for device activity.Map<String,String>getMetadata()Deprecated.intgetMetadataCount()The metadata key-value pairs assigned to the device.Map<String,String>getMetadataMap()The metadata key-value pairs assigned to the device.StringgetMetadataOrDefault(String key, String defaultValue)The metadata key-value pairs assigned to the device.StringgetMetadataOrThrow(String key)The metadata key-value pairs assigned to the device.StringgetName()The resource path name.com.google.protobuf.ByteStringgetNameBytes()The resource path name.longgetNumId()[Output only] A server-defined unique numeric ID for the device.com.google.protobuf.Parser<Device>getParserForType()intgetSerializedSize()DeviceStategetState()[Output only] The state most recently received from the device.DeviceStateOrBuildergetStateOrBuilder()[Output only] The state most recently received from the device.booleanhasConfig()The most recent device configuration, which is eventually sent from Cloud IoT Core to the device.booleanhasGatewayConfig()Gateway-related configuration and state.inthashCode()booleanhasLastConfigAckTime()[Output only] The last time a cloud-to-device config version acknowledgment was received from the device.booleanhasLastConfigSendTime()[Output only] The last time a cloud-to-device config version was sent to the device.booleanhasLastErrorStatus()[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub.booleanhasLastErrorTime()[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub.booleanhasLastEventTime()[Output only] The last time a telemetry event was received.booleanhasLastHeartbeatTime()[Output only] The last time an MQTT `PINGREQ` was received.booleanhasLastStateTime()[Output only] The last time a state event was received.booleanhasState()[Output only] The state most recently received from the device.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)booleanisInitialized()static Device.BuildernewBuilder()static Device.BuildernewBuilder(Device prototype)Device.BuildernewBuilderForType()protected Device.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static DeviceparseDelimitedFrom(InputStream input)static DeviceparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DeviceparseFrom(byte[] data)static DeviceparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DeviceparseFrom(com.google.protobuf.ByteString data)static DeviceparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DeviceparseFrom(com.google.protobuf.CodedInputStream input)static DeviceparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DeviceparseFrom(InputStream input)static DeviceparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static DeviceparseFrom(ByteBuffer data)static DeviceparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<Device>parser()Device.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
NUM_ID_FIELD_NUMBER
public static final int NUM_ID_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CREDENTIALS_FIELD_NUMBER
public static final int CREDENTIALS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_HEARTBEAT_TIME_FIELD_NUMBER
public static final int LAST_HEARTBEAT_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_EVENT_TIME_FIELD_NUMBER
public static final int LAST_EVENT_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_STATE_TIME_FIELD_NUMBER
public static final int LAST_STATE_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_CONFIG_ACK_TIME_FIELD_NUMBER
public static final int LAST_CONFIG_ACK_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_CONFIG_SEND_TIME_FIELD_NUMBER
public static final int LAST_CONFIG_SEND_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BLOCKED_FIELD_NUMBER
public static final int BLOCKED_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_ERROR_TIME_FIELD_NUMBER
public static final int LAST_ERROR_TIME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LAST_ERROR_STATUS_FIELD_NUMBER
public static final int LAST_ERROR_STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
CONFIG_FIELD_NUMBER
public static final int CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
STATE_FIELD_NUMBER
public static final int STATE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LOG_LEVEL_FIELD_NUMBER
public static final int LOG_LEVEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
METADATA_FIELD_NUMBER
public static final int METADATA_FIELD_NUMBER
- See Also:
- Constant Field Values
-
GATEWAY_CONFIG_FIELD_NUMBER
public static final int GATEWAY_CONFIG_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getId
public String getId()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;- Specified by:
getIdin interfaceDeviceOrBuilder- Returns:
- The id.
-
getIdBytes
public com.google.protobuf.ByteString getIdBytes()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;- Specified by:
getIdBytesin interfaceDeviceOrBuilder- Returns:
- The bytes for id.
-
getName
public 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;- Specified by:
getNamein interfaceDeviceOrBuilder- Returns:
- The name.
-
getNameBytes
public 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;- Specified by:
getNameBytesin interfaceDeviceOrBuilder- Returns:
- The bytes for name.
-
getNumId
public 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;- Specified by:
getNumIdin interfaceDeviceOrBuilder- Returns:
- The numId.
-
getCredentialsList
public 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;- Specified by:
getCredentialsListin interfaceDeviceOrBuilder
-
getCredentialsOrBuilderList
public 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;- Specified by:
getCredentialsOrBuilderListin interfaceDeviceOrBuilder
-
getCredentialsCount
public 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;- Specified by:
getCredentialsCountin interfaceDeviceOrBuilder
-
getCredentials
public 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;- Specified by:
getCredentialsin interfaceDeviceOrBuilder
-
getCredentialsOrBuilder
public 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;- Specified by:
getCredentialsOrBuilderin interfaceDeviceOrBuilder
-
hasLastHeartbeatTime
public 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;- Specified by:
hasLastHeartbeatTimein interfaceDeviceOrBuilder- Returns:
- Whether the lastHeartbeatTime field is set.
-
getLastHeartbeatTime
public 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;- Specified by:
getLastHeartbeatTimein interfaceDeviceOrBuilder- Returns:
- The lastHeartbeatTime.
-
getLastHeartbeatTimeOrBuilder
public 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;- Specified by:
getLastHeartbeatTimeOrBuilderin interfaceDeviceOrBuilder
-
hasLastEventTime
public 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;- Specified by:
hasLastEventTimein interfaceDeviceOrBuilder- Returns:
- Whether the lastEventTime field is set.
-
getLastEventTime
public 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;- Specified by:
getLastEventTimein interfaceDeviceOrBuilder- Returns:
- The lastEventTime.
-
getLastEventTimeOrBuilder
public 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;- Specified by:
getLastEventTimeOrBuilderin interfaceDeviceOrBuilder
-
hasLastStateTime
public 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;- Specified by:
hasLastStateTimein interfaceDeviceOrBuilder- Returns:
- Whether the lastStateTime field is set.
-
getLastStateTime
public 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;- Specified by:
getLastStateTimein interfaceDeviceOrBuilder- Returns:
- The lastStateTime.
-
getLastStateTimeOrBuilder
public 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;- Specified by:
getLastStateTimeOrBuilderin interfaceDeviceOrBuilder
-
hasLastConfigAckTime
public 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;- Specified by:
hasLastConfigAckTimein interfaceDeviceOrBuilder- Returns:
- Whether the lastConfigAckTime field is set.
-
getLastConfigAckTime
public 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;- Specified by:
getLastConfigAckTimein interfaceDeviceOrBuilder- Returns:
- The lastConfigAckTime.
-
getLastConfigAckTimeOrBuilder
public 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;- Specified by:
getLastConfigAckTimeOrBuilderin interfaceDeviceOrBuilder
-
hasLastConfigSendTime
public 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;- Specified by:
hasLastConfigSendTimein interfaceDeviceOrBuilder- Returns:
- Whether the lastConfigSendTime field is set.
-
getLastConfigSendTime
public 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;- Specified by:
getLastConfigSendTimein interfaceDeviceOrBuilder- Returns:
- The lastConfigSendTime.
-
getLastConfigSendTimeOrBuilder
public 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;- Specified by:
getLastConfigSendTimeOrBuilderin interfaceDeviceOrBuilder
-
getBlocked
public 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;- Specified by:
getBlockedin interfaceDeviceOrBuilder- Returns:
- The blocked.
-
hasLastErrorTime
public 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;- Specified by:
hasLastErrorTimein interfaceDeviceOrBuilder- Returns:
- Whether the lastErrorTime field is set.
-
getLastErrorTime
public 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;- Specified by:
getLastErrorTimein interfaceDeviceOrBuilder- Returns:
- The lastErrorTime.
-
getLastErrorTimeOrBuilder
public 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;- Specified by:
getLastErrorTimeOrBuilderin interfaceDeviceOrBuilder
-
hasLastErrorStatus
public 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;- Specified by:
hasLastErrorStatusin interfaceDeviceOrBuilder- Returns:
- Whether the lastErrorStatus field is set.
-
getLastErrorStatus
public 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;- Specified by:
getLastErrorStatusin interfaceDeviceOrBuilder- Returns:
- The lastErrorStatus.
-
getLastErrorStatusOrBuilder
public 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;- Specified by:
getLastErrorStatusOrBuilderin interfaceDeviceOrBuilder
-
hasConfig
public 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;- Specified by:
hasConfigin interfaceDeviceOrBuilder- Returns:
- Whether the config field is set.
-
getConfig
public 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;- Specified by:
getConfigin interfaceDeviceOrBuilder- Returns:
- The config.
-
getConfigOrBuilder
public 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;- Specified by:
getConfigOrBuilderin interfaceDeviceOrBuilder
-
hasState
public 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;- Specified by:
hasStatein interfaceDeviceOrBuilder- Returns:
- Whether the state field is set.
-
getState
public 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;- Specified by:
getStatein interfaceDeviceOrBuilder- Returns:
- The state.
-
getStateOrBuilder
public 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;- Specified by:
getStateOrBuilderin interfaceDeviceOrBuilder
-
getLogLevelValue
public 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;- Specified by:
getLogLevelValuein interfaceDeviceOrBuilder- Returns:
- The enum numeric value on the wire for logLevel.
-
getLogLevel
public 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;- Specified by:
getLogLevelin interfaceDeviceOrBuilder- Returns:
- The logLevel.
-
getMetadataCount
public int getMetadataCount()
Description copied from interface:DeviceOrBuilderThe 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;- Specified by:
getMetadataCountin interfaceDeviceOrBuilder
-
containsMetadata
public 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;- Specified by:
containsMetadatain interfaceDeviceOrBuilder
-
getMetadata
@Deprecated public Map<String,String> getMetadata()
Deprecated.UsegetMetadataMap()instead.- Specified by:
getMetadatain interfaceDeviceOrBuilder
-
getMetadataMap
public 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;- Specified by:
getMetadataMapin interfaceDeviceOrBuilder
-
getMetadataOrDefault
public 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;- Specified by:
getMetadataOrDefaultin interfaceDeviceOrBuilder
-
getMetadataOrThrow
public 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;- Specified by:
getMetadataOrThrowin interfaceDeviceOrBuilder
-
hasGatewayConfig
public boolean hasGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;- Specified by:
hasGatewayConfigin interfaceDeviceOrBuilder- Returns:
- Whether the gatewayConfig field is set.
-
getGatewayConfig
public GatewayConfig getGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;- Specified by:
getGatewayConfigin interfaceDeviceOrBuilder- Returns:
- The gatewayConfig.
-
getGatewayConfigOrBuilder
public GatewayConfigOrBuilder getGatewayConfigOrBuilder()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;- Specified by:
getGatewayConfigOrBuilderin interfaceDeviceOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static Device parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Device parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Device parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Device parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Device parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Device parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Device parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Device parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Device parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static Device parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static Device parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static Device parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public Device.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static Device.Builder newBuilder()
-
newBuilder
public static Device.Builder newBuilder(Device prototype)
-
toBuilder
public Device.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Device.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static Device getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<Device> parser()
-
getParserForType
public com.google.protobuf.Parser<Device> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Device getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-