- 2.73.0 (latest)
- 2.72.0
- 2.70.0
- 2.68.0
- 2.67.0
- 2.64.0
- 2.63.0
- 2.62.0
- 2.60.0
- 2.59.0
- 2.58.0
- 2.57.0
- 2.56.0
- 2.55.0
- 2.54.0
- 2.53.0
- 2.52.0
- 2.51.0
- 2.49.0
- 2.48.0
- 2.47.0
- 2.46.0
- 2.45.0
- 2.44.0
- 2.43.0
- 2.42.0
- 2.41.0
- 2.40.0
- 2.39.0
- 2.37.0
- 2.36.0
- 2.35.0
- 2.34.0
- 2.33.0
- 2.32.0
- 2.31.0
- 2.30.0
- 2.29.0
- 2.28.0
- 2.27.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.6
- 2.2.1
- 2.1.7
public
final
class
Device
extends
GeneratedMessageV3
implements
DeviceOrBuilder
The device resource.
Protobuf type google.cloud.iot.v1.Device
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > DeviceImplements
DeviceOrBuilderStatic Fields
BLOCKED_FIELD_NUMBER
public
static
final
int
BLOCKED_FIELD_NUMBER
CONFIG_FIELD_NUMBER
public
static
final
int
CONFIG_FIELD_NUMBER
CREDENTIALS_FIELD_NUMBER
public
static
final
int
CREDENTIALS_FIELD_NUMBER
GATEWAY_CONFIG_FIELD_NUMBER
public
static
final
int
GATEWAY_CONFIG_FIELD_NUMBER
ID_FIELD_NUMBER
public
static
final
int
ID_FIELD_NUMBER
LAST_CONFIG_ACK_TIME_FIELD_NUMBER
public
static
final
int
LAST_CONFIG_ACK_TIME_FIELD_NUMBER
LAST_CONFIG_SEND_TIME_FIELD_NUMBER
public
static
final
int
LAST_CONFIG_SEND_TIME_FIELD_NUMBER
LAST_ERROR_STATUS_FIELD_NUMBER
public
static
final
int
LAST_ERROR_STATUS_FIELD_NUMBER
LAST_ERROR_TIME_FIELD_NUMBER
public
static
final
int
LAST_ERROR_TIME_FIELD_NUMBER
LAST_EVENT_TIME_FIELD_NUMBER
public
static
final
int
LAST_EVENT_TIME_FIELD_NUMBER
LAST_HEARTBEAT_TIME_FIELD_NUMBER
public
static
final
int
LAST_HEARTBEAT_TIME_FIELD_NUMBER
LAST_STATE_TIME_FIELD_NUMBER
public
static
final
int
LAST_STATE_TIME_FIELD_NUMBER
LOG_LEVEL_FIELD_NUMBER
public
static
final
int
LOG_LEVEL_FIELD_NUMBER
METADATA_FIELD_NUMBER
public
static
final
int
METADATA_FIELD_NUMBER
NAME_FIELD_NUMBER
public
static
final
int
NAME_FIELD_NUMBER
NUM_ID_FIELD_NUMBER
public
static
final
int
NUM_ID_FIELD_NUMBER
STATE_FIELD_NUMBER
public
static
final
int
STATE_FIELD_NUMBER
Static Methods
getDefaultInstance()
public
static
Device
getDefaultInstance
()
getDescriptor()
public
static
final
Descriptors
.
Descriptor
getDescriptor
()
newBuilder()
public
static
Device
.
Builder
newBuilder
()
newBuilder(Device prototype)
public
static
Device
.
Builder
newBuilder
(
Device
prototype
)
parseDelimitedFrom(InputStream input)
public
static
Device
parseDelimitedFrom
(
InputStream
input
)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Device
parseDelimitedFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(byte[] data)
public
static
Device
parseFrom
(
byte
[]
data
)
data
byte
[]
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public
static
Device
parseFrom
(
byte
[]
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteString data)
public
static
Device
parseFrom
(
ByteString
data
)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public
static
Device
parseFrom
(
ByteString
data
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(CodedInputStream input)
public
static
Device
parseFrom
(
CodedInputStream
input
)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Device
parseFrom
(
CodedInputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(InputStream input)
public
static
Device
parseFrom
(
InputStream
input
)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public
static
Device
parseFrom
(
InputStream
input
,
ExtensionRegistryLite
extensionRegistry
)
parseFrom(ByteBuffer data)
public
static
Device
parseFrom
(
ByteBuffer
data
)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public
static
Device
parseFrom
(
ByteBuffer
data
,
ExtensionRegistryLite
extensionRegistry
)
parser()
public
static
Parser<Device>
parser
()
Methods
containsMetadata(String key)
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 + 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;
equals(Object obj)
public
boolean
equals
(
Object
obj
)
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;
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;
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;
getCredentials(int index)
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;
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;
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;
getCredentialsOrBuilder(int index)
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;
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;
getDefaultInstanceForType()
public
Device
getDefaultInstanceForType
()
getGatewayConfig()
public
GatewayConfig
getGatewayConfig
()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
getGatewayConfigOrBuilder()
public
GatewayConfigOrBuilder
getGatewayConfigOrBuilder
()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
getId()
public
String
getId
()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
getIdBytes()
public
ByteString
getIdBytes
()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
getLastConfigAckTime()
public
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;
getLastConfigAckTimeOrBuilder()
public
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;
getLastConfigSendTime()
public
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;
getLastConfigSendTimeOrBuilder()
public
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;
getLastErrorStatus()
public
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;
com.google.rpc.Status
The lastErrorStatus.
getLastErrorStatusOrBuilder()
public
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;
com.google.rpc.StatusOrBuilder
getLastErrorTime()
public
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;
getLastErrorTimeOrBuilder()
public
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;
getLastEventTime()
public
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;
getLastEventTimeOrBuilder()
public
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;
getLastHeartbeatTime()
public
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;
getLastHeartbeatTimeOrBuilder()
public
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;
getLastStateTime()
public
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;
getLastStateTimeOrBuilder()
public
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;
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;
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;
getMetadata() (deprecated)
public
Map<String
,
String
>
getMetadata
()
Use #getMetadataMap() instead.
getMetadataCount()
public
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 + 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;
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 + 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 key, String defaultValue)
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 + 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 key)
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 + 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;
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;
getNameBytes()
public
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;
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;
getParserForType()
public
Parser<Device>
getParserForType
()
getSerializedSize()
public
int
getSerializedSize
()
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;
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;
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;
hasGatewayConfig()
public
boolean
hasGatewayConfig
()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
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;
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;
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;
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;
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;
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;
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;
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;
hashCode()
public
int
hashCode
()
internalGetFieldAccessorTable()
protected
GeneratedMessageV3
.
FieldAccessorTable
internalGetFieldAccessorTable
()
internalGetMapField(int number)
protected
MapField
internalGetMapField
(
int
number
)
isInitialized()
public
final
boolean
isInitialized
()
newBuilderForType()
public
Device
.
Builder
newBuilderForType
()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected
Device
.
Builder
newBuilderForType
(
GeneratedMessageV3
.
BuilderParent
parent
)
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected
Object
newInstance
(
GeneratedMessageV3
.
UnusedPrivateParameter
unused
)
toBuilder()
public
Device
.
Builder
toBuilder
()
writeTo(CodedOutputStream output)
public
void
writeTo
(
CodedOutputStream
output
)