chirpstack_api 4.17.0

ChirpStack Protobuf / gRPC API definitions.
Documentation
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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
syntax = "proto3";

package api;

import "common/common.proto";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Chirpstack.Api";
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/api";
option java_multiple_files = true;
option java_outer_classname = "DeviceProfileProto";
option java_package = "io.chirpstack.api";
option php_metadata_namespace = "GPBMetadata\\Chirpstack\\Api";
option php_namespace = "Chirpstack\\Api";

enum CodecRuntime {
  // None.
  NONE = 0;

  // Cayenne LPP.
  CAYENNE_LPP = 1;

  // JavaScript.
  JS = 2;
}

enum MeasurementKind {
  // Unknown (in which case it is not tracked).
  UNKNOWN = 0;

  // Incrementing counters that never decrease (these are not reset on each
  // reading).
  COUNTER = 1;

  // Counters that do get reset upon reading.
  ABSOLUTE = 2;

  // E.g. a temperature value.
  GAUGE = 3;

  // E.g. a firmware version, true / false value.
  STRING = 4;
}

enum CadPeriodicity {
  // 1 second.
  SEC_1 = 0;

  // 500 milliseconds
  MS_500 = 1;

  // 250 milliseconds
  MS_250 = 2;

  // 100 milliseconds
  MS_100 = 3;

  // 50 milliseconds
  MS_50 = 4;

  // 20 milliseconds
  MS_20 = 5;
}

enum SecondChAckOffset {
  // 0 kHz.
  KHZ_0 = 0;

  // 200 kHz.
  KHZ_200 = 1;

  // 400 kHz.
  KHZ_400 = 2;

  // 800 kHz.
  KHZ_800 = 3;

  // 1600 kHz.
  KHZ_1600 = 4;

  // 3200 kHz.
  KHZ_3200 = 5;
}

enum RelayModeActivation {
  // Disable the relay mode.
  DISABLE_RELAY_MODE = 0;

  // Enable the relay model.
  ENABLE_RELAY_MODE = 1;

  // Dynamic.
  DYNAMIC = 2;

  // End-device controlled.
  END_DEVICE_CONTROLLED = 3;
}

enum Ts003Version {
  // Not implemented.
  TS003_NOT_IMPLEMENTED = 0;

  // v1.0.0.
  TS003_V100 = 1;

  // v2.0.0
  TS003_v200 = 2;
}

enum Ts004Version {
  // Not implemented.
  TS004_NOT_IMPLEMENTED = 0;

  // v1.0.0.
  TS004_V100 = 1;

  // v2.0.0
  TS004_V200 = 2;
}

enum Ts005Version {
  // Not implemented.
  TS005_NOT_IMPLEMENTED = 0;

  // v1.0.0.
  TS005_V100 = 1;

  // v2.0.0
  TS005_V200 = 2;
}

// DeviceProfileService is the service providing API methods for managing
// device-profiles.
service DeviceProfileService {
  // Create the given device-profile.
  rpc Create(CreateDeviceProfileRequest) returns (CreateDeviceProfileResponse) {
    option (google.api.http) = {
      post: "/api/device-profiles"
      body: "*"
    };
  }

  // Get the device-profile for the given ID.
  rpc Get(GetDeviceProfileRequest) returns (GetDeviceProfileResponse) {
    option (google.api.http) = {get: "/api/device-profiles/{id}"};
  }

  // GetByProfileId tries to get the device-profile for the given ProfileID (see TR0005).
  rpc GetByProfileId(GetDeviceProfileByProfileIdRequest) returns (GetDeviceProfileByProfileIdResponse) {
    option (google.api.http) = {get: "/api/device-profiles/{vendor_id}/{vendor_profile_id}"};
  }

  // Update the given device-profile.
  rpc Update(UpdateDeviceProfileRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {
      put: "/api/device-profiles/{device_profile.id}"
      body: "*"
    };
  }

  // Delete the device-profile with the given ID.
  rpc Delete(DeleteDeviceProfileRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {delete: "/api/device-profiles/{id}"};
  }

  // List the available device-profiles.
  rpc List(ListDeviceProfilesRequest) returns (ListDeviceProfilesResponse) {
    option (google.api.http) = {get: "/api/device-profiles"};
  }

  // List the available device-profile vendors.
  rpc ListVendors(ListDeviceProfileVendorsRequest) returns (ListDeviceProfileVendorsResponse) {
    option (google.api.http) = {get: "/api/device-profiles/vendors"};
  }

  // Get the device-profile vendor.
  rpc GetVendor(GetDeviceProfileVendorRequest) returns (GetDeviceProfileVendorResponse) {
    option (google.api.http) = {get: "/api/device-profiles/vendors/{id}"};
  }

  // Delete the given device-profile vendor.
  rpc DeleteVendor(DeleteDeviceProfileVendorRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {delete: "/api/device-profiles/vendors/{id}"};
  }

  // List the available device-profile devices.
  rpc ListDevices(ListDeviceProfileDevicesRequest) returns (ListDeviceProfileDevicesResponse) {
    option (google.api.http) = {get: "/api/device-profiles/devices"};
  }

  // Get the device-profile device.
  rpc GetDevice(GetDeviceProfileDeviceRequest) returns (GetDeviceProfileDeviceResponse) {
    option (google.api.http) = {get: "/api/device-profiles/devices/{id}"};
  }

  // Delete the given device-profile device.
  rpc DeleteDevice(DeleteDeviceProfileDeviceRequest) returns (google.protobuf.Empty) {
    option (google.api.http) = {delete: "/api/device-profiles/devices/{id}"};
  }

  // List available ADR algorithms.
  rpc ListAdrAlgorithms(google.protobuf.Empty) returns (ListDeviceProfileAdrAlgorithmsResponse) {
    option (google.api.http) = {get: "/api/device-profiles/adr-algorithms"};
  }
}

message DeviceProfile {
  // Device-profile ID (UUID).
  // Note: on create this will be automatically generated.
  string id = 1;

  // Tenant ID (UUID).
  string tenant_id = 2;

  // Name.
  string name = 3;

  // Description.
  string description = 26;

  // Region.
  common.Region region = 4;

  // LoRaWAN mac-version.
  common.MacVersion mac_version = 5;

  // Regional parameters revision.
  common.RegParamsRevision reg_params_revision = 6;

  // ADR algorithm ID.
  string adr_algorithm_id = 7;

  // Payload codec runtime.
  CodecRuntime payload_codec_runtime = 8;

  // Payload codec script.
  string payload_codec_script = 9;

  // Flush queue on device activation.
  bool flush_queue_on_activate = 10;

  // Uplink interval (seconds).
  // This defines the expected uplink interval which the device uses for
  // communication. If the uplink interval has expired and no uplink has
  // been received, the device is considered inactive.
  uint32 uplink_interval = 11;

  // Device-status request interval (times / day).
  // This defines the times per day that ChirpStack will request the
  // device-status from the device.
  uint32 device_status_req_interval = 12;

  // Supports OTAA.
  bool supports_otaa = 13;

  // Supports Class B.
  bool supports_class_b = 14;

  // Supports Class-C.
  bool supports_class_c = 15;

  // Class-B timeout (seconds).
  // This is the maximum time ChirpStack will wait to receive an acknowledgement
  // from the device (if requested).
  uint32 class_b_timeout = 16;

  // Class-B ping-slot periodicity.
  // Valid options are: 0 - 7.
  //
  // Number of ping-slots per beacon-period:
  // pingNb = 2^(7-periodicity)
  //
  // Periodicity: 0 = 128 ping-slots per beacon period = ~ every 1 sec
  // Periodicity: 7 = 1 ping-slot per beacon period = ~ every 128 sec
  uint32 class_b_ping_slot_periodicity = 17;

  // Class-B ping-slot DR.
  uint32 class_b_ping_slot_dr = 18;

  // Class-B ping-slot freq (Hz).
  uint32 class_b_ping_slot_freq = 19;

  // Class-C timeout (seconds).
  // This is the maximum time ChirpStack will wait to receive an acknowledgement
  // from the device (if requested).
  uint32 class_c_timeout = 20;

  // RX1 delay (for ABP).
  uint32 abp_rx1_delay = 21;

  // RX1 DR offset (for ABP).
  uint32 abp_rx1_dr_offset = 22;

  // RX2 DR (for ABP).
  uint32 abp_rx2_dr = 23;

  // RX2 frequency (for ABP, Hz).
  uint32 abp_rx2_freq = 24;

  // Tags (user defined).
  // These tags can be used to add additional information the the
  // device-profile. These tags are exposed in all the integration events of
  // devices using this device-profile.
  map<string, string> tags = 25;

  // Measurements.
  // If defined, ChirpStack will visualize these metrics in the web-interface.
  map<string, Measurement> measurements = 27;

  // Auto-detect measurements.
  // If set to true, measurements will be automatically added based on the
  // keys of the decoded payload. In cases where the decoded payload contains
  // random keys in the data, you want to set this to false.
  bool auto_detect_measurements = 28;

  // Region configuration ID.
  // If set, devices will only use the associated region. If let blank, then
  // devices will use all regions matching the selected common-name. Note
  // that multiple region configurations can exist for the same common-name,
  // e.g. to provide an 8 channel and 16 channel configuration for the US915
  // band.
  string region_config_id = 29;

  // Device is a Relay device.
  // Enable this in case the device is a Relay. A Relay device implements TS011
  // and is able to relay data from relay capable devices.
  // See for more information the TS011 specification.
  bool is_relay = 30;

  // Device is a Relay end-device.
  // Enable this in case the device is an end-device that can operate under a
  // Relay. Please refer to the TS011 specification for more information.
  bool is_relay_ed = 31;

  // End-device only accept data through relay.
  // Only accept data for this device through a relay. This setting is useful
  // for testing as in case of a test-setup, the end-device is usually within
  // range of the gateway.
  bool relay_ed_relay_only = 32;

  // Relay must be enabled.
  bool relay_enabled = 33;

  // Relay CAD periodicity.
  CadPeriodicity relay_cad_periodicity = 34;

  // Relay default channel index.
  // Valid values are 0 and 1, please refer to the RP002 specification for
  // the meaning of these values.
  uint32 relay_default_channel_index = 35;

  // Relay second channel frequency (Hz).
  uint32 relay_second_channel_freq = 36;

  // Relay second channel DR.
  uint32 relay_second_channel_dr = 37;

  // Relay second channel ACK offset.
  SecondChAckOffset relay_second_channel_ack_offset = 38;

  // Relay end-device activation mode.
  RelayModeActivation relay_ed_activation_mode = 39;

  // Relay end-device smart-enable level.
  uint32 relay_ed_smart_enable_level = 40;

  // Relay end-device back-off (in case it does not receive WOR ACK frame).
  // 0 = Always send a LoRaWAN uplink
  // 1..63 = Send a LoRaWAN uplink after X WOR frames without a WOR ACK
  uint32 relay_ed_back_off = 41;

  // Relay end-device uplink limit bucket size.
  //
  // This field indicates the multiplier to determine the bucket size
  // according to the following formula:
  // BucketSize TOKEN = _reload_rate x _bucket_size
  //
  // Valid values (0 - 3):
  //   0 = 1
  //   1 = 2
  //   2 = 4
  //   3 = 12
  uint32 relay_ed_uplink_limit_bucket_size = 42;

  // Relay end-device uplink limit reload rate.
  //
  // Valid values:
  //   * 0 - 62 = X tokens every hour
  //   * 63     = no limitation
  uint32 relay_ed_uplink_limit_reload_rate = 43;

  // Relay join-request limit reload rate.
  //
  // Valid values:
  //   * 0 - 126 = X tokens every hour
  //   * 127     = no limitation
  uint32 relay_join_req_limit_reload_rate = 44;

  // Relay notify limit reload rate.
  //
  // Valid values:
  //   * 0 - 126 = X tokens every hour
  //   * 127     = no limitation
  uint32 relay_notify_limit_reload_rate = 45;

  // Relay global uplink limit reload rate.
  //
  // Valid values:
  //   * 0 - 126 = X tokens every hour
  //   * 127     = no limitation
  uint32 relay_global_uplink_limit_reload_rate = 46;

  // Relay overall limit reload rate.
  //
  // Valid values:
  //   * 0 - 126 = X tokens every hour
  //   * 127     = no limitation
  uint32 relay_overall_limit_reload_rate = 47;

  // Relay join-request limit bucket size.
  //
  // This field indicates the multiplier to determine the bucket size
  // according to the following formula:
  // BucketSize TOKEN = _reload_rate x _bucket_size
  //
  // Valid values (0 - 3):
  //   0 = 1
  //   1 = 2
  //   2 = 4
  //   3 = 12
  uint32 relay_join_req_limit_bucket_size = 48;

  // Relay notify limit bucket size.
  //
  // This field indicates the multiplier to determine the bucket size
  // according to the following formula:
  // BucketSize TOKEN = _reload_rate x _bucket_size
  //
  // Valid values (0 - 3):
  //   0 = 1
  //   1 = 2
  //   2 = 4
  //   3 = 12
  uint32 relay_notify_limit_bucket_size = 49;

  // Relay globak uplink limit bucket size.
  //
  // This field indicates the multiplier to determine the bucket size
  // according to the following formula:
  // BucketSize TOKEN = _reload_rate x _bucket_size
  //
  // Valid values (0 - 3):
  //   0 = 1
  //   1 = 2
  //   2 = 4
  //   3 = 12
  uint32 relay_global_uplink_limit_bucket_size = 50;

  // Relay overall limit bucket size.
  //
  // This field indicates the multiplier to determine the bucket size
  // according to the following formula:
  // BucketSize TOKEN = _reload_rate x _bucket_size
  //
  // Valid values (0 - 3):
  //   0 = 1
  //   1 = 2
  //   2 = 4
  //   3 = 12
  uint32 relay_overall_limit_bucket_size = 51;

  // Allow roaming.
  //
  // If set to true, it means that the device is allowed to use roaming.
  bool allow_roaming = 52;

  // RX1 Delay.
  //
  // This makes it possible to override the system RX1 Delay. Please note that
  // this values only has effect in case it is higher than the system value.
  // In other words, it can be used to increase the RX1 Delay but not to decrease
  // it.
  // Valid options are 1 - 15 (0 = always use system RX1 Delay).
  uint32 rx1_delay = 53;

  // Application Layer parameters.
  AppLayerParams app_layer_params = 54;

  // Device-profile device ID (UUID) (optiona).
  string device_id = 55;

  // Firmware version.
  string firmware_version = 56;

  // Supported uplink data-rates.
  //
  // This option configures the data-rates that are supported by the devices
  // using this device-profile. If not set, the default min / max data-rates
  // will be used.
  // Example: In case you would like to use also SF5 and SF6 in EU868, you would
  // set this option to: 0, 1, 2, 3, 4, 5, 6, 7, 12, 13.
  repeated uint32 supported_uplink_data_rates = 57;
}

message Measurement {
  // Name (user defined).
  string name = 2;

  // Kind.
  MeasurementKind kind = 3;
}

message AppLayerParams {
  // TS003 version (Application Layer Clock Sync).
  Ts003Version ts003_version = 1;

  // TS003 fPort.
  uint32 ts003_f_port = 2;

  // TS004 version (Fragmented Data Block Transport).
  Ts004Version ts004_version = 3;

  // TS004 fPort.
  uint32 ts004_f_port = 4;

  // TS005 version (Remote Multicast Setup).
  Ts005Version ts005_version = 5;

  // TS005 fPort.
  uint32 ts005_f_port = 6;
}

message DeviceProfileListItem {
  // Device-profile ID (UUID).
  string id = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;

  // Name.
  string name = 4;

  // Region.
  common.Region region = 5;

  // LoRaWAN mac-version.
  common.MacVersion mac_version = 6;

  // Regional parameters revision.
  common.RegParamsRevision reg_params_revision = 7;

  // Supports OTAA.
  bool supports_otaa = 8;

  // Supports Class-B.
  bool supports_class_b = 9;

  // Supports Class-C.
  bool supports_class_c = 10;

  // Vendor ID.
  // This value is only available for global device-profiles.
  string vendor_id = 11;

  // Vendor name.
  // This value is only available for global device-profiles.
  string vendor_name = 12;

  // Device ID.
  // This value is only available for global device-profiles.
  string device_id = 13;

  // Device name.
  // This value is only available for global device-profiles.
  string device_name = 14;

  // Firmware version.
  string firmware_version = 15;
}

message CreateDeviceProfileRequest {
  // Object to create.
  DeviceProfile device_profile = 1;
}

message CreateDeviceProfileResponse {
  // ID (UUID).
  string id = 1;
}

message GetDeviceProfileRequest {
  // ID (UUID).
  string id = 1;
}

message GetDeviceProfileResponse {
  // Device-profile object.
  DeviceProfile device_profile = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;
}

message GetDeviceProfileByProfileIdRequest {
  // Vendor ID.
  uint32 vendor_id = 1;

  // Vendor Profile ID.
  uint32 vendor_profile_id = 2;
}

message GetDeviceProfileByProfileIdResponse {
  // Device-profile object.
  DeviceProfile device_profile = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;
}

message UpdateDeviceProfileRequest {
  // Device-profile object.
  DeviceProfile device_profile = 1;
}

message DeleteDeviceProfileRequest {
  // ID (UUID).
  string id = 1;
}

message ListDeviceProfilesRequest {
  // Max number of device-profiles to return in the result-set.
  // If not set, it will be treated as 0, and the response will only return the total_count.
  uint32 limit = 1;

  // Offset in the result-set (for pagination).
  uint32 offset = 2;

  // If set, the given string will be used to search on name.
  string search = 3;

  // Tenant ID to list the device-profiles for.
  // This value must be set, unless global_only is set to true. The result will
  // be the list of device-profiles matching the tenant_id and global tenants.
  // If you only wish to list the device-profiles matching the tenant_id, you
  // must set tenant_only to true.
  string tenant_id = 4;

  // Device-profile device ID.
  // Note that his is the device-profile ID, not the DevEUI.
  // This value requires global_only to be set to true.
  string device_id = 5;

  // Only list global (non-tenant) device-profiles.
  bool global_only = 6;

  // Only list device-profiles matching the tenant_id.
  bool tenant_only = 7;
}

message ListDeviceProfilesResponse {
  // Total number of device-profiles.
  uint32 total_count = 1;

  // Result-set.
  repeated DeviceProfileListItem result = 2;
}

message ListDeviceProfileVendorsRequest {
  // Max number of device-profile vendors to return in the result-set.
  // If not set, it will be treated as 0, and the response will only return the total_count.
  uint32 limit = 1;

  // Offset in the result-set (for pagination).
  uint32 offset = 2;
}

message ListDeviceProfileVendorsResponse {
  // Total number of vendors.
  uint32 total_count = 1;

  // Result-set.
  repeated DeviceProfileVendorListItem result = 2;
}

message GetDeviceProfileVendorRequest {
  // Vendor ID (UUID).
  string id = 1;
}

message DeviceProfileVendor {
  // Vendor ID (UUID).
  string id = 1;

  // Name.
  string name = 4;

  // LoRa Alliance Vendor ID.
  uint32 vendor_id = 5;

  // OUIs.
  repeated string ouis = 6;

  // Metadata.
  map<string, string> metadata = 7;
}

message GetDeviceProfileVendorResponse {
  // Vendor object.
  DeviceProfileVendor vendor = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;
}

message DeleteDeviceProfileVendorRequest {
  // Vendor ID (UUID).
  string id = 1;
}

message DeviceProfileVendorListItem {
  // Vendor ID (UUID).
  string id = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;

  // Name.
  string name = 4;

  // LoRa Alliance Vendor ID.
  uint32 vendor_id = 5;

  // OUIs.
  repeated string ouis = 6;

  // Metadata.
  map<string, string> metadata = 7;
}

message ListDeviceProfileDevicesRequest {
  // Max number of device-profile vendors to return in the result-set.
  // If not set, it will be treated as 0, and the response will only return the total_count.
  uint32 limit = 1;

  // Offset in the result-set (for pagination).
  uint32 offset = 2;

  // Vendor ID (UUID).
  string vendor_id = 3;
}

message ListDeviceProfileDevicesResponse {
  // Total number of devices.
  uint32 total_count = 1;

  // Result-set.
  repeated DeviceProfileDeviceListItem result = 2;
}

message GetDeviceProfileDeviceRequest {
  // Device-profile device ID.
  string id = 1;
}

message DeviceProfileDevice {
  // Device ID (UUID).
  string id = 1;

  // Vendor ID (UUID).
  string vendor_id = 2;

  // Name.
  string name = 3;

  // Description.
  string description = 4;

  // Metadata.
  map<string, string> metadata = 5;
}

message GetDeviceProfileDeviceResponse {
  // Device object.
  DeviceProfileDevice device = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;
}

message DeleteDeviceProfileDeviceRequest {
  // Device ID (UUID).
  string id = 1;
}

message DeviceProfileDeviceListItem {
  // Device ID (UUID).
  string id = 1;

  // Created at timestamp.
  google.protobuf.Timestamp created_at = 2;

  // Last update timestamp.
  google.protobuf.Timestamp updated_at = 3;

  // Name.
  string name = 4;
}

message ListDeviceProfileAdrAlgorithmsResponse {
  // Total number of algorithms.
  uint32 total_count = 1;

  // Result-set.
  repeated AdrAlgorithmListItem result = 2;
}

message AdrAlgorithmListItem {
  // Algorithm ID.
  string id = 1;

  // Algorithm name.
  string name = 2;
}