- 2.53.0 (latest)
- 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 static final class Device.Builder extends GeneratedMessageV3.Builder<Device.Builder> implements DeviceOrBuilder
The device resource.
Protobuf type google.cloud.iot.v1.Device
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Device.BuilderImplements
DeviceOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllCredentials(Iterable<? extends DeviceCredential> values)
public Device.Builder addAllCredentials(Iterable<? extends DeviceCredential> values)
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;
Parameter | |
---|---|
Name | Description |
values | Iterable<? extends com.google.cloud.iot.v1.DeviceCredential> |
Returns | |
---|---|
Type | Description |
Device.Builder |
addCredentials(DeviceCredential value)
public Device.Builder addCredentials(DeviceCredential value)
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;
Parameter | |
---|---|
Name | Description |
value | DeviceCredential |
Returns | |
---|---|
Type | Description |
Device.Builder |
addCredentials(DeviceCredential.Builder builderForValue)
public Device.Builder addCredentials(DeviceCredential.Builder builderForValue)
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;
Parameter | |
---|---|
Name | Description |
builderForValue | DeviceCredential.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
addCredentials(int index, DeviceCredential value)
public Device.Builder addCredentials(int index, DeviceCredential value)
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;
Parameters | |
---|---|
Name | Description |
index | int |
value | DeviceCredential |
Returns | |
---|---|
Type | Description |
Device.Builder |
addCredentials(int index, DeviceCredential.Builder builderForValue)
public Device.Builder addCredentials(int index, DeviceCredential.Builder builderForValue)
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;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | DeviceCredential.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
addCredentialsBuilder()
public DeviceCredential.Builder addCredentialsBuilder()
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;
Returns | |
---|---|
Type | Description |
DeviceCredential.Builder |
addCredentialsBuilder(int index)
public DeviceCredential.Builder addCredentialsBuilder(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;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
DeviceCredential.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Device.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
Device.Builder |
build()
public Device build()
Returns | |
---|---|
Type | Description |
Device |
buildPartial()
public Device buildPartial()
Returns | |
---|---|
Type | Description |
Device |
clear()
public Device.Builder clear()
Returns | |
---|---|
Type | Description |
Device.Builder |
clearBlocked()
public Device.Builder clearBlocked()
If a device is blocked, connections or requests from this device will fail. Can be used to temporarily prevent the device from connecting if, for example, the sensor is generating bad data and needs maintenance.
bool blocked = 19;
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
clearConfig()
public Device.Builder clearConfig()
The most recent device configuration, which is eventually sent from
Cloud IoT Core to the device. If not present on creation, the
configuration will be initialized with an empty payload and version value
of 1
. To update this field after creation, use the
DeviceManager.ModifyCloudToDeviceConfig
method.
.google.cloud.iot.v1.DeviceConfig config = 13;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearCredentials()
public Device.Builder clearCredentials()
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;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearField(Descriptors.FieldDescriptor field)
public Device.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
Device.Builder |
clearGatewayConfig()
public Device.Builder clearGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearId()
public Device.Builder clearId()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
clearLastConfigAckTime()
public Device.Builder clearLastConfigAckTime()
[Output only] The last time a cloud-to-device config version acknowledgment was received from the device. This field is only for configurations sent through MQTT.
.google.protobuf.Timestamp last_config_ack_time = 14;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLastConfigSendTime()
public Device.Builder clearLastConfigSendTime()
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLastErrorStatus()
public Device.Builder clearLastErrorStatus()
[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this field. If no errors have occurred, this field has an empty message and the status code 0 == OK. Otherwise, this field is expected to have a status code other than OK.
.google.rpc.Status last_error_status = 11;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLastErrorTime()
public Device.Builder clearLastErrorTime()
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub. This field is the timestamp of 'last_error_status'.
.google.protobuf.Timestamp last_error_time = 10;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLastEventTime()
public Device.Builder clearLastEventTime()
[Output only] The last time a telemetry event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.
.google.protobuf.Timestamp last_event_time = 8;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLastHeartbeatTime()
public Device.Builder clearLastHeartbeatTime()
[Output only] The last time an MQTT PINGREQ
was received. This field
applies only to devices connecting through MQTT. MQTT clients usually only
send PINGREQ
messages if the connection is idle, and no other messages
have been sent. Timestamps are periodically collected and written to
storage; they may be stale by a few minutes.
.google.protobuf.Timestamp last_heartbeat_time = 7;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLastStateTime()
public Device.Builder clearLastStateTime()
[Output only] The last time a state event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.
.google.protobuf.Timestamp last_state_time = 20;
Returns | |
---|---|
Type | Description |
Device.Builder |
clearLogLevel()
public Device.Builder clearLogLevel()
Beta Feature
The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used.
.google.cloud.iot.v1.LogLevel log_level = 21;
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
clearMetadata()
public Device.Builder clearMetadata()
Returns | |
---|---|
Type | Description |
Device.Builder |
clearName()
public Device.Builder clearName()
The resource path name. For example,
projects/p1/locations/us-central1/registries/registry0/devices/dev0
or
projects/p1/locations/us-central1/registries/registry0/devices/{num_id}
.
When name
is populated as a response from the service, it always ends
in the device numeric ID.
string name = 2;
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
clearNumId()
public Device.Builder clearNumId()
[Output only] A server-defined unique numeric ID for the device. This is a more compact way to identify devices, and it is globally unique.
uint64 num_id = 3;
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public Device.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
Device.Builder |
clearState()
public Device.Builder clearState()
[Output only] The state most recently received from the device. If no state has been reported, this field is not present.
.google.cloud.iot.v1.DeviceState state = 16;
Returns | |
---|---|
Type | Description |
Device.Builder |
clone()
public Device.Builder clone()
Returns | |
---|---|
Type | Description |
Device.Builder |
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;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
boolean |
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;
Returns | |
---|---|
Type | Description |
boolean | The blocked. |
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;
Returns | |
---|---|
Type | Description |
DeviceConfig | The config. |
getConfigBuilder()
public DeviceConfig.Builder getConfigBuilder()
The most recent device configuration, which is eventually sent from
Cloud IoT Core to the device. If not present on creation, the
configuration will be initialized with an empty payload and version value
of 1
. To update this field after creation, use the
DeviceManager.ModifyCloudToDeviceConfig
method.
.google.cloud.iot.v1.DeviceConfig config = 13;
Returns | |
---|---|
Type | Description |
DeviceConfig.Builder |
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;
Returns | |
---|---|
Type | Description |
DeviceConfigOrBuilder |
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;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
DeviceCredential |
getCredentialsBuilder(int index)
public DeviceCredential.Builder getCredentialsBuilder(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;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
DeviceCredential.Builder |
getCredentialsBuilderList()
public List<DeviceCredential.Builder> getCredentialsBuilderList()
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;
Returns | |
---|---|
Type | Description |
List<Builder> |
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;
Returns | |
---|---|
Type | Description |
int |
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;
Returns | |
---|---|
Type | Description |
List<DeviceCredential> |
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;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
DeviceCredentialOrBuilder |
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;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.iot.v1.DeviceCredentialOrBuilder> |
getDefaultInstanceForType()
public Device getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
Device |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getGatewayConfig()
public GatewayConfig getGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Returns | |
---|---|
Type | Description |
GatewayConfig | The gatewayConfig. |
getGatewayConfigBuilder()
public GatewayConfig.Builder getGatewayConfigBuilder()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Returns | |
---|---|
Type | Description |
GatewayConfig.Builder |
getGatewayConfigOrBuilder()
public GatewayConfigOrBuilder getGatewayConfigOrBuilder()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Returns | |
---|---|
Type | Description |
GatewayConfigOrBuilder |
getId()
public String getId()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
Returns | |
---|---|
Type | Description |
String | The id. |
getIdBytes()
public ByteString getIdBytes()
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
Returns | |
---|---|
Type | Description |
ByteString | The bytes for id. |
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;
Returns | |
---|---|
Type | Description |
Timestamp | The lastConfigAckTime. |
getLastConfigAckTimeBuilder()
public Timestamp.Builder getLastConfigAckTimeBuilder()
[Output only] The last time a cloud-to-device config version acknowledgment was received from the device. This field is only for configurations sent through MQTT.
.google.protobuf.Timestamp last_config_ack_time = 14;
Returns | |
---|---|
Type | Description |
Builder |
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
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;
Returns | |
---|---|
Type | Description |
Timestamp | The lastConfigSendTime. |
getLastConfigSendTimeBuilder()
public Timestamp.Builder getLastConfigSendTimeBuilder()
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
Returns | |
---|---|
Type | Description |
Builder |
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
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;
Returns | |
---|---|
Type | Description |
com.google.rpc.Status | The lastErrorStatus. |
getLastErrorStatusBuilder()
public Status.Builder getLastErrorStatusBuilder()
[Output only] The error message of the most recent error, such as a failure to publish to Cloud Pub/Sub. 'last_error_time' is the timestamp of this field. If no errors have occurred, this field has an empty message and the status code 0 == OK. Otherwise, this field is expected to have a status code other than OK.
.google.rpc.Status last_error_status = 11;
Returns | |
---|---|
Type | Description |
com.google.rpc.Status.Builder |
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;
Returns | |
---|---|
Type | Description |
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;
Returns | |
---|---|
Type | Description |
Timestamp | The lastErrorTime. |
getLastErrorTimeBuilder()
public Timestamp.Builder getLastErrorTimeBuilder()
[Output only] The time the most recent error occurred, such as a failure to publish to Cloud Pub/Sub. This field is the timestamp of 'last_error_status'.
.google.protobuf.Timestamp last_error_time = 10;
Returns | |
---|---|
Type | Description |
Builder |
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
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;
Returns | |
---|---|
Type | Description |
Timestamp | The lastEventTime. |
getLastEventTimeBuilder()
public Timestamp.Builder getLastEventTimeBuilder()
[Output only] The last time a telemetry event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.
.google.protobuf.Timestamp last_event_time = 8;
Returns | |
---|---|
Type | Description |
Builder |
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
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;
Returns | |
---|---|
Type | Description |
Timestamp | The lastHeartbeatTime. |
getLastHeartbeatTimeBuilder()
public Timestamp.Builder getLastHeartbeatTimeBuilder()
[Output only] The last time an MQTT PINGREQ
was received. This field
applies only to devices connecting through MQTT. MQTT clients usually only
send PINGREQ
messages if the connection is idle, and no other messages
have been sent. Timestamps are periodically collected and written to
storage; they may be stale by a few minutes.
.google.protobuf.Timestamp last_heartbeat_time = 7;
Returns | |
---|---|
Type | Description |
Builder |
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
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;
Returns | |
---|---|
Type | Description |
Timestamp | The lastStateTime. |
getLastStateTimeBuilder()
public Timestamp.Builder getLastStateTimeBuilder()
[Output only] The last time a state event was received. Timestamps are periodically collected and written to storage; they may be stale by a few minutes.
.google.protobuf.Timestamp last_state_time = 20;
Returns | |
---|---|
Type | Description |
Builder |
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;
Returns | |
---|---|
Type | Description |
TimestampOrBuilder |
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;
Returns | |
---|---|
Type | Description |
LogLevel | The logLevel. |
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;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for logLevel. |
getMetadata() (deprecated)
public Map<String,String> getMetadata()
Use #getMetadataMap() instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
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;
Returns | |
---|---|
Type | Description |
int |
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;
Returns | |
---|---|
Type | Description |
Map<String,String> |
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;
Parameters | |
---|---|
Name | Description |
key | String |
defaultValue | String |
Returns | |
---|---|
Type | Description |
String |
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;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
String |
getMutableMetadata() (deprecated)
public Map<String,String> getMutableMetadata()
Use alternate mutation accessors instead.
Returns | |
---|---|
Type | Description |
Map<String,String> |
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;
Returns | |
---|---|
Type | Description |
String | The name. |
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;
Returns | |
---|---|
Type | Description |
ByteString | 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;
Returns | |
---|---|
Type | Description |
long | The numId. |
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;
Returns | |
---|---|
Type | Description |
DeviceState | The state. |
getStateBuilder()
public DeviceState.Builder getStateBuilder()
[Output only] The state most recently received from the device. If no state has been reported, this field is not present.
.google.cloud.iot.v1.DeviceState state = 16;
Returns | |
---|---|
Type | Description |
DeviceState.Builder |
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;
Returns | |
---|---|
Type | Description |
DeviceStateOrBuilder |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the config field is set. |
hasGatewayConfig()
public boolean hasGatewayConfig()
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Returns | |
---|---|
Type | Description |
boolean | Whether the gatewayConfig field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastConfigAckTime field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastConfigSendTime field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastErrorStatus field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastErrorTime field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastEventTime field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastHeartbeatTime field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the lastStateTime field is set. |
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the state field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter | |
---|---|
Name | Description |
number | int |
Returns | |
---|---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeConfig(DeviceConfig value)
public Device.Builder mergeConfig(DeviceConfig value)
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;
Parameter | |
---|---|
Name | Description |
value | DeviceConfig |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeFrom(Device other)
public Device.Builder mergeFrom(Device other)
Parameter | |
---|---|
Name | Description |
other | Device |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Device.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Device.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Device.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeGatewayConfig(GatewayConfig value)
public Device.Builder mergeGatewayConfig(GatewayConfig value)
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Parameter | |
---|---|
Name | Description |
value | GatewayConfig |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastConfigAckTime(Timestamp value)
public Device.Builder mergeLastConfigAckTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastConfigSendTime(Timestamp value)
public Device.Builder mergeLastConfigSendTime(Timestamp value)
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastErrorStatus(Status value)
public Device.Builder mergeLastErrorStatus(Status value)
[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;
Parameter | |
---|---|
Name | Description |
value | com.google.rpc.Status |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastErrorTime(Timestamp value)
public Device.Builder mergeLastErrorTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastEventTime(Timestamp value)
public Device.Builder mergeLastEventTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastHeartbeatTime(Timestamp value)
public Device.Builder mergeLastHeartbeatTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeLastStateTime(Timestamp value)
public Device.Builder mergeLastStateTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeState(DeviceState value)
public Device.Builder mergeState(DeviceState value)
[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;
Parameter | |
---|---|
Name | Description |
value | DeviceState |
Returns | |
---|---|
Type | Description |
Device.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Device.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Device.Builder |
putAllMetadata(Map<String,String> values)
public Device.Builder putAllMetadata(Map<String,String> values)
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;
Parameter | |
---|---|
Name | Description |
values | Map<String,String> |
Returns | |
---|---|
Type | Description |
Device.Builder |
putMetadata(String key, String value)
public Device.Builder putMetadata(String key, String value)
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;
Parameters | |
---|---|
Name | Description |
key | String |
value | String |
Returns | |
---|---|
Type | Description |
Device.Builder |
removeCredentials(int index)
public Device.Builder removeCredentials(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;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
Device.Builder |
removeMetadata(String key)
public Device.Builder removeMetadata(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;
Parameter | |
---|---|
Name | Description |
key | String |
Returns | |
---|---|
Type | Description |
Device.Builder |
setBlocked(boolean value)
public Device.Builder setBlocked(boolean value)
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;
Parameter | |
---|---|
Name | Description |
value | boolean The blocked to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setConfig(DeviceConfig value)
public Device.Builder setConfig(DeviceConfig value)
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;
Parameter | |
---|---|
Name | Description |
value | DeviceConfig |
Returns | |
---|---|
Type | Description |
Device.Builder |
setConfig(DeviceConfig.Builder builderForValue)
public Device.Builder setConfig(DeviceConfig.Builder builderForValue)
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;
Parameter | |
---|---|
Name | Description |
builderForValue | DeviceConfig.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setCredentials(int index, DeviceCredential value)
public Device.Builder setCredentials(int index, DeviceCredential value)
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;
Parameters | |
---|---|
Name | Description |
index | int |
value | DeviceCredential |
Returns | |
---|---|
Type | Description |
Device.Builder |
setCredentials(int index, DeviceCredential.Builder builderForValue)
public Device.Builder setCredentials(int index, DeviceCredential.Builder builderForValue)
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;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | DeviceCredential.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Device.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
Device.Builder |
setGatewayConfig(GatewayConfig value)
public Device.Builder setGatewayConfig(GatewayConfig value)
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Parameter | |
---|---|
Name | Description |
value | GatewayConfig |
Returns | |
---|---|
Type | Description |
Device.Builder |
setGatewayConfig(GatewayConfig.Builder builderForValue)
public Device.Builder setGatewayConfig(GatewayConfig.Builder builderForValue)
Gateway-related configuration and state.
.google.cloud.iot.v1.GatewayConfig gateway_config = 24;
Parameter | |
---|---|
Name | Description |
builderForValue | GatewayConfig.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setId(String value)
public Device.Builder setId(String value)
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
Parameter | |
---|---|
Name | Description |
value | String The id to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setIdBytes(ByteString value)
public Device.Builder setIdBytes(ByteString value)
The user-defined device identifier. The device ID must be unique within a device registry.
string id = 1;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for id to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setLastConfigAckTime(Timestamp value)
public Device.Builder setLastConfigAckTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastConfigAckTime(Timestamp.Builder builderForValue)
public Device.Builder setLastConfigAckTime(Timestamp.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastConfigSendTime(Timestamp value)
public Device.Builder setLastConfigSendTime(Timestamp value)
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastConfigSendTime(Timestamp.Builder builderForValue)
public Device.Builder setLastConfigSendTime(Timestamp.Builder builderForValue)
[Output only] The last time a cloud-to-device config version was sent to the device.
.google.protobuf.Timestamp last_config_send_time = 18;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastErrorStatus(Status value)
public Device.Builder setLastErrorStatus(Status value)
[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;
Parameter | |
---|---|
Name | Description |
value | com.google.rpc.Status |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastErrorStatus(Status.Builder builderForValue)
public Device.Builder setLastErrorStatus(Status.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | com.google.rpc.Status.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastErrorTime(Timestamp value)
public Device.Builder setLastErrorTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastErrorTime(Timestamp.Builder builderForValue)
public Device.Builder setLastErrorTime(Timestamp.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastEventTime(Timestamp value)
public Device.Builder setLastEventTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastEventTime(Timestamp.Builder builderForValue)
public Device.Builder setLastEventTime(Timestamp.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastHeartbeatTime(Timestamp value)
public Device.Builder setLastHeartbeatTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastHeartbeatTime(Timestamp.Builder builderForValue)
public Device.Builder setLastHeartbeatTime(Timestamp.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastStateTime(Timestamp value)
public Device.Builder setLastStateTime(Timestamp value)
[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;
Parameter | |
---|---|
Name | Description |
value | Timestamp |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLastStateTime(Timestamp.Builder builderForValue)
public Device.Builder setLastStateTime(Timestamp.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setLogLevel(LogLevel value)
public Device.Builder setLogLevel(LogLevel value)
Beta Feature
The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used.
.google.cloud.iot.v1.LogLevel log_level = 21;
Parameter | |
---|---|
Name | Description |
value | LogLevel The logLevel to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setLogLevelValue(int value)
public Device.Builder setLogLevelValue(int value)
Beta Feature
The logging verbosity for device activity. If unspecified, DeviceRegistry.log_level will be used.
.google.cloud.iot.v1.LogLevel log_level = 21;
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for logLevel to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setName(String value)
public Device.Builder setName(String value)
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;
Parameter | |
---|---|
Name | Description |
value | String The name to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setNameBytes(ByteString value)
public Device.Builder setNameBytes(ByteString value)
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;
Parameter | |
---|---|
Name | Description |
value | ByteString The bytes for name to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setNumId(long value)
public Device.Builder setNumId(long value)
[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;
Parameter | |
---|---|
Name | Description |
value | long The numId to set. |
Returns | |
---|---|
Type | Description |
Device.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Device.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
Device.Builder |
setState(DeviceState value)
public Device.Builder setState(DeviceState value)
[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;
Parameter | |
---|---|
Name | Description |
value | DeviceState |
Returns | |
---|---|
Type | Description |
Device.Builder |
setState(DeviceState.Builder builderForValue)
public Device.Builder setState(DeviceState.Builder builderForValue)
[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;
Parameter | |
---|---|
Name | Description |
builderForValue | DeviceState.Builder |
Returns | |
---|---|
Type | Description |
Device.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Device.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
Device.Builder |