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 class
Device.Builder
The 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 int
BLOCKED_FIELD_NUMBER
static int
CONFIG_FIELD_NUMBER
static int
CREDENTIALS_FIELD_NUMBER
static int
GATEWAY_CONFIG_FIELD_NUMBER
static int
ID_FIELD_NUMBER
static int
LAST_CONFIG_ACK_TIME_FIELD_NUMBER
static int
LAST_CONFIG_SEND_TIME_FIELD_NUMBER
static int
LAST_ERROR_STATUS_FIELD_NUMBER
static int
LAST_ERROR_TIME_FIELD_NUMBER
static int
LAST_EVENT_TIME_FIELD_NUMBER
static int
LAST_HEARTBEAT_TIME_FIELD_NUMBER
static int
LAST_STATE_TIME_FIELD_NUMBER
static int
LOG_LEVEL_FIELD_NUMBER
static int
METADATA_FIELD_NUMBER
static int
NAME_FIELD_NUMBER
static int
NUM_ID_FIELD_NUMBER
static int
STATE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsMetadata(String key)
The metadata key-value pairs assigned to the device.boolean
equals(Object obj)
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.static Device
getDefaultInstance()
Device
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
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.com.google.protobuf.Parser<Device>
getParserForType()
int
getSerializedSize()
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.int
hashCode()
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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static Device.Builder
newBuilder()
static Device.Builder
newBuilder(Device prototype)
Device.Builder
newBuilderForType()
protected Device.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Device
parseDelimitedFrom(InputStream input)
static Device
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Device
parseFrom(byte[] data)
static Device
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Device
parseFrom(com.google.protobuf.ByteString data)
static Device
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Device
parseFrom(com.google.protobuf.CodedInputStream input)
static Device
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Device
parseFrom(InputStream input)
static Device
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Device
parseFrom(ByteBuffer data)
static Device
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Device>
parser()
Device.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
getId
in 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:
getIdBytes
in 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:
getName
in 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:
getNameBytes
in 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:
getNumId
in 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:
getCredentialsList
in 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:
getCredentialsOrBuilderList
in 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:
getCredentialsCount
in 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:
getCredentials
in 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:
getCredentialsOrBuilder
in 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:
hasLastHeartbeatTime
in 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:
getLastHeartbeatTime
in 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:
getLastHeartbeatTimeOrBuilder
in 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:
hasLastEventTime
in 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:
getLastEventTime
in 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:
getLastEventTimeOrBuilder
in 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:
hasLastStateTime
in 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:
getLastStateTime
in 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:
getLastStateTimeOrBuilder
in 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:
hasLastConfigAckTime
in 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:
getLastConfigAckTime
in 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:
getLastConfigAckTimeOrBuilder
in 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:
hasLastConfigSendTime
in 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:
getLastConfigSendTime
in 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:
getLastConfigSendTimeOrBuilder
in 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:
getBlocked
in 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:
hasLastErrorTime
in 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:
getLastErrorTime
in 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:
getLastErrorTimeOrBuilder
in 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:
hasLastErrorStatus
in 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:
getLastErrorStatus
in 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:
getLastErrorStatusOrBuilder
in 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:
hasConfig
in 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:
getConfig
in 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:
getConfigOrBuilder
in 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:
hasState
in 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:
getState
in 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:
getStateOrBuilder
in 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:
getLogLevelValue
in 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:
getLogLevel
in interfaceDeviceOrBuilder
- Returns:
- The logLevel.
-
getMetadataCount
public int getMetadataCount()
Description copied from interface:DeviceOrBuilder
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:
getMetadataCount
in 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:
containsMetadata
in interfaceDeviceOrBuilder
-
getMetadata
@Deprecated public Map<String,String> getMetadata()
Deprecated.UsegetMetadataMap()
instead.- Specified by:
getMetadata
in 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:
getMetadataMap
in 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:
getMetadataOrDefault
in 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:
getMetadataOrThrow
in interfaceDeviceOrBuilder
-
hasGatewayConfig
public boolean hasGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
- Specified by:
hasGatewayConfig
in 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:
getGatewayConfig
in interfaceDeviceOrBuilder
- Returns:
- The gatewayConfig.
-
getGatewayConfigOrBuilder
public GatewayConfigOrBuilder getGatewayConfigOrBuilder()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
- Specified by:
getGatewayConfigOrBuilder
in interfaceDeviceOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Device.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Device getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-