This repository has been archived by the owner on Sep 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
DeviceOrBuilder.java
730 lines (711 loc) · 22 KB
/
DeviceOrBuilder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/iot/v1/resources.proto
package com.google.cloud.iot.v1;
public interface DeviceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.iot.v1.Device)
com.google.protobuf.MessageOrBuilder {
/**
*
*
* <pre>
* The user-defined device identifier. The device ID must be unique
* within a device registry.
* </pre>
*
* <code>string id = 1;</code>
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
* <pre>
* The user-defined device identifier. The device ID must be unique
* within a device registry.
* </pre>
*
* <code>string id = 1;</code>
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>string name = 2;</code>
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>string name = 2;</code>
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>uint64 num_id = 3;</code>
*
* @return The numId.
*/
long getNumId();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code>
*/
java.util.List<com.google.cloud.iot.v1.DeviceCredential> getCredentialsList();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code>
*/
com.google.cloud.iot.v1.DeviceCredential getCredentials(int index);
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code>
*/
int getCredentialsCount();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code>
*/
java.util.List<? extends com.google.cloud.iot.v1.DeviceCredentialOrBuilder>
getCredentialsOrBuilderList();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>repeated .google.cloud.iot.v1.DeviceCredential credentials = 12;</code>
*/
com.google.cloud.iot.v1.DeviceCredentialOrBuilder getCredentialsOrBuilder(int index);
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code>
*
* @return Whether the lastHeartbeatTime field is set.
*/
boolean hasLastHeartbeatTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code>
*
* @return The lastHeartbeatTime.
*/
com.google.protobuf.Timestamp getLastHeartbeatTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_heartbeat_time = 7;</code>
*/
com.google.protobuf.TimestampOrBuilder getLastHeartbeatTimeOrBuilder();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_event_time = 8;</code>
*
* @return Whether the lastEventTime field is set.
*/
boolean hasLastEventTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_event_time = 8;</code>
*
* @return The lastEventTime.
*/
com.google.protobuf.Timestamp getLastEventTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_event_time = 8;</code>
*/
com.google.protobuf.TimestampOrBuilder getLastEventTimeOrBuilder();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_state_time = 20;</code>
*
* @return Whether the lastStateTime field is set.
*/
boolean hasLastStateTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_state_time = 20;</code>
*
* @return The lastStateTime.
*/
com.google.protobuf.Timestamp getLastStateTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_state_time = 20;</code>
*/
com.google.protobuf.TimestampOrBuilder getLastStateTimeOrBuilder();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code>
*
* @return Whether the lastConfigAckTime field is set.
*/
boolean hasLastConfigAckTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code>
*
* @return The lastConfigAckTime.
*/
com.google.protobuf.Timestamp getLastConfigAckTime();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.protobuf.Timestamp last_config_ack_time = 14;</code>
*/
com.google.protobuf.TimestampOrBuilder getLastConfigAckTimeOrBuilder();
/**
*
*
* <pre>
* [Output only] The last time a cloud-to-device config version was sent to
* the device.
* </pre>
*
* <code>.google.protobuf.Timestamp last_config_send_time = 18;</code>
*
* @return Whether the lastConfigSendTime field is set.
*/
boolean hasLastConfigSendTime();
/**
*
*
* <pre>
* [Output only] The last time a cloud-to-device config version was sent to
* the device.
* </pre>
*
* <code>.google.protobuf.Timestamp last_config_send_time = 18;</code>
*
* @return The lastConfigSendTime.
*/
com.google.protobuf.Timestamp getLastConfigSendTime();
/**
*
*
* <pre>
* [Output only] The last time a cloud-to-device config version was sent to
* the device.
* </pre>
*
* <code>.google.protobuf.Timestamp last_config_send_time = 18;</code>
*/
com.google.protobuf.TimestampOrBuilder getLastConfigSendTimeOrBuilder();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>bool blocked = 19;</code>
*
* @return The blocked.
*/
boolean getBlocked();
/**
*
*
* <pre>
* [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'.
* </pre>
*
* <code>.google.protobuf.Timestamp last_error_time = 10;</code>
*
* @return Whether the lastErrorTime field is set.
*/
boolean hasLastErrorTime();
/**
*
*
* <pre>
* [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'.
* </pre>
*
* <code>.google.protobuf.Timestamp last_error_time = 10;</code>
*
* @return The lastErrorTime.
*/
com.google.protobuf.Timestamp getLastErrorTime();
/**
*
*
* <pre>
* [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'.
* </pre>
*
* <code>.google.protobuf.Timestamp last_error_time = 10;</code>
*/
com.google.protobuf.TimestampOrBuilder getLastErrorTimeOrBuilder();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.rpc.Status last_error_status = 11;</code>
*
* @return Whether the lastErrorStatus field is set.
*/
boolean hasLastErrorStatus();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.rpc.Status last_error_status = 11;</code>
*
* @return The lastErrorStatus.
*/
com.google.rpc.Status getLastErrorStatus();
/**
*
*
* <pre>
* [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.
* </pre>
*
* <code>.google.rpc.Status last_error_status = 11;</code>
*/
com.google.rpc.StatusOrBuilder getLastErrorStatusOrBuilder();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code>
*
* @return Whether the config field is set.
*/
boolean hasConfig();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code>
*
* @return The config.
*/
com.google.cloud.iot.v1.DeviceConfig getConfig();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>.google.cloud.iot.v1.DeviceConfig config = 13;</code>
*/
com.google.cloud.iot.v1.DeviceConfigOrBuilder getConfigOrBuilder();
/**
*
*
* <pre>
* [Output only] The state most recently received from the device. If no state
* has been reported, this field is not present.
* </pre>
*
* <code>.google.cloud.iot.v1.DeviceState state = 16;</code>
*
* @return Whether the state field is set.
*/
boolean hasState();
/**
*
*
* <pre>
* [Output only] The state most recently received from the device. If no state
* has been reported, this field is not present.
* </pre>
*
* <code>.google.cloud.iot.v1.DeviceState state = 16;</code>
*
* @return The state.
*/
com.google.cloud.iot.v1.DeviceState getState();
/**
*
*
* <pre>
* [Output only] The state most recently received from the device. If no state
* has been reported, this field is not present.
* </pre>
*
* <code>.google.cloud.iot.v1.DeviceState state = 16;</code>
*/
com.google.cloud.iot.v1.DeviceStateOrBuilder getStateOrBuilder();
/**
*
*
* <pre>
* **Beta Feature**
* The logging verbosity for device activity. If unspecified,
* DeviceRegistry.log_level will be used.
* </pre>
*
* <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code>
*
* @return The enum numeric value on the wire for logLevel.
*/
int getLogLevelValue();
/**
*
*
* <pre>
* **Beta Feature**
* The logging verbosity for device activity. If unspecified,
* DeviceRegistry.log_level will be used.
* </pre>
*
* <code>.google.cloud.iot.v1.LogLevel log_level = 21;</code>
*
* @return The logLevel.
*/
com.google.cloud.iot.v1.LogLevel getLogLevel();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>map<string, string> metadata = 17;</code>
*/
int getMetadataCount();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>map<string, string> metadata = 17;</code>
*/
boolean containsMetadata(java.lang.String key);
/** Use {@link #getMetadataMap()} instead. */
@java.lang.Deprecated
java.util.Map<java.lang.String, java.lang.String> getMetadata();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>map<string, string> metadata = 17;</code>
*/
java.util.Map<java.lang.String, java.lang.String> getMetadataMap();
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>map<string, string> metadata = 17;</code>
*/
java.lang.String getMetadataOrDefault(java.lang.String key, java.lang.String defaultValue);
/**
*
*
* <pre>
* 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.
* </pre>
*
* <code>map<string, string> metadata = 17;</code>
*/
java.lang.String getMetadataOrThrow(java.lang.String key);
/**
*
*
* <pre>
* Gateway-related configuration and state.
* </pre>
*
* <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code>
*
* @return Whether the gatewayConfig field is set.
*/
boolean hasGatewayConfig();
/**
*
*
* <pre>
* Gateway-related configuration and state.
* </pre>
*
* <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code>
*
* @return The gatewayConfig.
*/
com.google.cloud.iot.v1.GatewayConfig getGatewayConfig();
/**
*
*
* <pre>
* Gateway-related configuration and state.
* </pre>
*
* <code>.google.cloud.iot.v1.GatewayConfig gateway_config = 24;</code>
*/
com.google.cloud.iot.v1.GatewayConfigOrBuilder getGatewayConfigOrBuilder();
}