@fivenet-app/gen 2026.3.0 → 2026.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/clients.ts +66 -6
  2. package/codegen/perms/perms.ts +104 -1
  3. package/package.json +1 -1
  4. package/perms.ts +16 -5
  5. package/resources/centrum/settings/settings.ts +1 -1
  6. package/resources/centrum/units/units.ts +1 -1
  7. package/resources/citizens/labels/access.ts +216 -0
  8. package/resources/citizens/labels/labels.ts +320 -0
  9. package/resources/{users → citizens}/licenses/licenses.ts +17 -17
  10. package/resources/clientconfig/clientconfig.ts +32 -289
  11. package/resources/cron/cron.ts +2 -2
  12. package/resources/documents/access/access.ts +0 -23
  13. package/resources/documents/category/category.ts +1 -1
  14. package/resources/documents/templates/templates.ts +2 -2
  15. package/resources/jobs/labels/labels.ts +16 -5
  16. package/resources/livemap/markers/marker_marker.ts +1 -1
  17. package/resources/settings/banner.ts +1 -1
  18. package/resources/settings/config.ts +16 -14
  19. package/resources/sync/data/data.ts +9 -9
  20. package/resources/users/activity/activity.ts +132 -12
  21. package/resources/users/props/props.ts +4 -4
  22. package/resources/users/user.ts +4 -4
  23. package/services/calendar/calendar.client.ts +2 -106
  24. package/services/calendar/calendar.ts +0 -1018
  25. package/services/calendar/entries.client.ts +129 -0
  26. package/services/calendar/entries.ts +1040 -0
  27. package/services/centrum/centrum.client.ts +23 -244
  28. package/services/centrum/centrum.ts +246 -2383
  29. package/services/centrum/dispatches.client.ts +155 -0
  30. package/services/centrum/dispatches.ts +1305 -0
  31. package/services/centrum/units.client.ts +116 -0
  32. package/services/centrum/units.ts +876 -0
  33. package/services/citizens/citizens.client.ts +0 -13
  34. package/services/citizens/citizens.ts +1 -115
  35. package/services/citizens/labels.client.ts +77 -0
  36. package/services/citizens/labels.ts +455 -0
  37. package/services/completor/completor.ts +5 -5
  38. package/services/documents/categories.client.ts +64 -0
  39. package/services/documents/categories.ts +331 -0
  40. package/services/documents/comments.client.ts +77 -0
  41. package/services/documents/comments.ts +479 -0
  42. package/services/documents/documents.client.ts +26 -182
  43. package/services/documents/documents.ts +335 -1682
  44. package/services/documents/templates.client.ts +90 -0
  45. package/services/documents/templates.ts +591 -0
  46. package/services/jobs/colleagues.client.ts +129 -0
  47. package/services/jobs/colleagues.ts +1129 -0
  48. package/services/jobs/jobs.client.ts +3 -107
  49. package/services/jobs/jobs.ts +1 -1113
  50. package/services/mailer/mailer.client.ts +0 -208
  51. package/services/mailer/mailer.ts +1 -2010
  52. package/services/mailer/settings.client.ts +103 -0
  53. package/services/mailer/settings.ts +708 -0
  54. package/services/mailer/thread.client.ts +155 -0
  55. package/services/mailer/thread.ts +1343 -0
  56. package/services/qualifications/exam.client.ts +77 -0
  57. package/services/qualifications/exam.ts +609 -0
  58. package/services/qualifications/qualifications.client.ts +1 -53
  59. package/services/qualifications/qualifications.ts +0 -591
  60. package/services/settings/cron.client.ts +13 -0
  61. package/services/settings/cron.ts +114 -1
  62. package/services/sync/sync.client.ts +271 -37
  63. package/services/sync/sync.ts +1463 -383
  64. package/svcs.ts +182 -94
  65. package/resources/sync/data/v2/data.ts +0 -220
  66. package/resources/users/labels/labels.ts +0 -160
  67. package/services/sync/v2/sync.client.ts +0 -331
  68. package/services/sync/v2/sync.ts +0 -1766
@@ -3,59 +3,27 @@
3
3
  // tslint:disable
4
4
  // @ts-nocheck
5
5
  import { ServiceType } from "@protobuf-ts/runtime-rpc";
6
+ import { WireType } from "@protobuf-ts/runtime";
6
7
  import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
7
8
  import type { IBinaryWriter } from "@protobuf-ts/runtime";
8
- import { WireType } from "@protobuf-ts/runtime";
9
9
  import type { BinaryReadOptions } from "@protobuf-ts/runtime";
10
10
  import type { IBinaryReader } from "@protobuf-ts/runtime";
11
11
  import { UnknownFieldHandler } from "@protobuf-ts/runtime";
12
12
  import type { PartialMessage } from "@protobuf-ts/runtime";
13
13
  import { reflectionMergePartial } from "@protobuf-ts/runtime";
14
14
  import { MessageType } from "@protobuf-ts/runtime";
15
- import { JobDispatchers } from "../../resources/centrum/dispatchers/dispatchers";
16
- import { Timestamp } from "../../resources/timestamp/timestamp";
17
- import { TakeDispatchResp } from "../../resources/centrum/dispatches/dispatches";
18
15
  import { DispatchStatus } from "../../resources/centrum/dispatches/dispatches";
19
- import { Job } from "../../resources/jobs/jobs";
20
- import { Dispatch } from "../../resources/centrum/dispatches/dispatches";
21
- import { StatusDispatch } from "../../resources/centrum/dispatches/dispatches";
22
16
  import { UnitStatus } from "../../resources/centrum/units/units";
23
- import { PaginationResponse } from "../../resources/common/database/database";
17
+ import { Dispatch } from "../../resources/centrum/dispatches/dispatches";
18
+ import { Unit } from "../../resources/centrum/units/units";
19
+ import { JobDispatchers } from "../../resources/centrum/dispatchers/dispatchers";
20
+ import { Timestamp } from "../../resources/timestamp/timestamp";
24
21
  import { Dispatchers } from "../../resources/centrum/dispatchers/dispatchers";
25
22
  import { HeatmapEntry } from "../../resources/livemap/heatmap/heatmap";
26
- import { Unit } from "../../resources/centrum/units/units";
27
- import { StatusUnit } from "../../resources/centrum/units/units";
28
23
  import { EffectiveAccess } from "../../resources/centrum/settings/settings";
29
24
  import { Settings } from "../../resources/centrum/settings/settings";
30
- import { PaginationRequest } from "../../resources/common/database/database";
31
- // Common
25
+ // Settings
32
26
 
33
- /**
34
- * @generated from protobuf message services.centrum.ListDispatchActivityRequest
35
- */
36
- export interface ListDispatchActivityRequest {
37
- /**
38
- * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
39
- */
40
- pagination?: PaginationRequest;
41
- /**
42
- * @generated from protobuf field: int64 id = 2
43
- */
44
- id: number;
45
- }
46
- /**
47
- * @generated from protobuf message services.centrum.ListUnitActivityRequest
48
- */
49
- export interface ListUnitActivityRequest {
50
- /**
51
- * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
52
- */
53
- pagination?: PaginationRequest;
54
- /**
55
- * @generated from protobuf field: int64 id = 2
56
- */
57
- id: number;
58
- }
59
27
  /**
60
28
  * @generated from protobuf message services.centrum.GetSettingsRequest
61
29
  */
@@ -92,106 +60,8 @@ export interface UpdateSettingsResponse {
92
60
  */
93
61
  settings?: Settings;
94
62
  }
95
- // Unit Management
63
+ // Heatmap
96
64
 
97
- /**
98
- * @generated from protobuf message services.centrum.ListUnitsRequest
99
- */
100
- export interface ListUnitsRequest {
101
- /**
102
- * @generated from protobuf field: repeated resources.centrum.units.StatusUnit status = 1
103
- */
104
- status: StatusUnit[];
105
- }
106
- /**
107
- * @generated from protobuf message services.centrum.ListUnitsResponse
108
- */
109
- export interface ListUnitsResponse {
110
- /**
111
- * @generated from protobuf field: repeated resources.centrum.units.Unit units = 1
112
- */
113
- units: Unit[];
114
- }
115
- /**
116
- * @generated from protobuf message services.centrum.CreateOrUpdateUnitRequest
117
- */
118
- export interface CreateOrUpdateUnitRequest {
119
- /**
120
- * @generated from protobuf field: resources.centrum.units.Unit unit = 1
121
- */
122
- unit?: Unit;
123
- }
124
- /**
125
- * @generated from protobuf message services.centrum.CreateOrUpdateUnitResponse
126
- */
127
- export interface CreateOrUpdateUnitResponse {
128
- /**
129
- * @generated from protobuf field: resources.centrum.units.Unit unit = 1
130
- */
131
- unit?: Unit;
132
- }
133
- /**
134
- * @generated from protobuf message services.centrum.DeleteUnitRequest
135
- */
136
- export interface DeleteUnitRequest {
137
- /**
138
- * @generated from protobuf field: int64 unit_id = 1
139
- */
140
- unitId: number;
141
- }
142
- /**
143
- * @generated from protobuf message services.centrum.DeleteUnitResponse
144
- */
145
- export interface DeleteUnitResponse {
146
- }
147
- /**
148
- * @generated from protobuf message services.centrum.UpdateUnitStatusRequest
149
- */
150
- export interface UpdateUnitStatusRequest {
151
- /**
152
- * @generated from protobuf field: int64 unit_id = 1
153
- */
154
- unitId: number;
155
- /**
156
- * @generated from protobuf field: resources.centrum.units.StatusUnit status = 2
157
- */
158
- status: StatusUnit;
159
- /**
160
- * @generated from protobuf field: optional string reason = 3
161
- */
162
- reason?: string;
163
- /**
164
- * @generated from protobuf field: optional string code = 4
165
- */
166
- code?: string;
167
- }
168
- /**
169
- * @generated from protobuf message services.centrum.UpdateUnitStatusResponse
170
- */
171
- export interface UpdateUnitStatusResponse {
172
- }
173
- /**
174
- * @generated from protobuf message services.centrum.AssignUnitRequest
175
- */
176
- export interface AssignUnitRequest {
177
- /**
178
- * @generated from protobuf field: int64 unit_id = 1
179
- */
180
- unitId: number;
181
- /**
182
- * @generated from protobuf field: repeated int32 to_add = 2
183
- */
184
- toAdd: number[];
185
- /**
186
- * @generated from protobuf field: repeated int32 to_remove = 3
187
- */
188
- toRemove: number[];
189
- }
190
- /**
191
- * @generated from protobuf message services.centrum.AssignUnitResponse
192
- */
193
- export interface AssignUnitResponse {
194
- }
195
65
  /**
196
66
  * @generated from protobuf message services.centrum.GetDispatchHeatmapRequest
197
67
  */
@@ -210,38 +80,7 @@ export interface GetDispatchHeatmapResponse {
210
80
  */
211
81
  entries: HeatmapEntry[];
212
82
  }
213
- /**
214
- * @generated from protobuf message services.centrum.UpdateDispatchersRequest
215
- */
216
- export interface UpdateDispatchersRequest {
217
- /**
218
- * @generated from protobuf field: repeated int32 to_remove = 1
219
- */
220
- toRemove: number[];
221
- }
222
- /**
223
- * @generated from protobuf message services.centrum.UpdateDispatchersResponse
224
- */
225
- export interface UpdateDispatchersResponse {
226
- /**
227
- * @generated from protobuf field: resources.centrum.dispatchers.Dispatchers dispatchers = 1
228
- */
229
- dispatchers?: Dispatchers;
230
- }
231
- /**
232
- * @generated from protobuf message services.centrum.ListUnitActivityResponse
233
- */
234
- export interface ListUnitActivityResponse {
235
- /**
236
- * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
237
- */
238
- pagination?: PaginationResponse;
239
- /**
240
- * @generated from protobuf field: repeated resources.centrum.units.UnitStatus activity = 2
241
- */
242
- activity: UnitStatus[];
243
- }
244
- // Dispatch Management
83
+ // Dispatchers
245
84
 
246
85
  /**
247
86
  * @generated from protobuf message services.centrum.TakeControlRequest
@@ -258,229 +97,22 @@ export interface TakeControlRequest {
258
97
  export interface TakeControlResponse {
259
98
  }
260
99
  /**
261
- * @generated from protobuf message services.centrum.ListDispatchesRequest
262
- */
263
- export interface ListDispatchesRequest {
264
- /**
265
- * @generated from protobuf field: resources.common.database.PaginationRequest pagination = 1
266
- */
267
- pagination?: PaginationRequest;
268
- /**
269
- * @generated from protobuf field: repeated resources.centrum.dispatches.StatusDispatch status = 2
270
- */
271
- status: StatusDispatch[];
272
- /**
273
- * @generated from protobuf field: repeated resources.centrum.dispatches.StatusDispatch not_status = 3
274
- */
275
- notStatus: StatusDispatch[];
276
- /**
277
- * @generated from protobuf field: repeated int64 ids = 4
278
- */
279
- ids: number[];
280
- /**
281
- * @generated from protobuf field: optional string postal = 5
282
- */
283
- postal?: string;
284
- }
285
- /**
286
- * @generated from protobuf message services.centrum.ListDispatchesResponse
287
- */
288
- export interface ListDispatchesResponse {
289
- /**
290
- * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
291
- */
292
- pagination?: PaginationResponse;
293
- /**
294
- * @generated from protobuf field: repeated resources.centrum.dispatches.Dispatch dispatches = 2
295
- */
296
- dispatches: Dispatch[];
297
- }
298
- /**
299
- * @generated from protobuf message services.centrum.GetDispatchRequest
300
- */
301
- export interface GetDispatchRequest {
302
- /**
303
- * @generated from protobuf field: int64 id = 1
304
- */
305
- id: number;
306
- }
307
- /**
308
- * @generated from protobuf message services.centrum.GetDispatchResponse
309
- */
310
- export interface GetDispatchResponse {
311
- /**
312
- * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch = 1
313
- */
314
- dispatch?: Dispatch;
315
- }
316
- /**
317
- * @generated from protobuf message services.centrum.CreateDispatchRequest
318
- */
319
- export interface CreateDispatchRequest {
320
- /**
321
- * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch = 1
322
- */
323
- dispatch?: Dispatch;
324
- }
325
- /**
326
- * @generated from protobuf message services.centrum.CreateDispatchResponse
327
- */
328
- export interface CreateDispatchResponse {
329
- /**
330
- * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch = 1
331
- */
332
- dispatch?: Dispatch;
333
- }
334
- /**
335
- * @generated from protobuf message services.centrum.UpdateDispatchRequest
336
- */
337
- export interface UpdateDispatchRequest {
338
- /**
339
- * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch = 1
340
- */
341
- dispatch?: Dispatch;
342
- }
343
- /**
344
- * @generated from protobuf message services.centrum.UpdateDispatchResponse
345
- */
346
- export interface UpdateDispatchResponse {
347
- /**
348
- * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch = 1
349
- */
350
- dispatch?: Dispatch;
351
- }
352
- /**
353
- * @generated from protobuf message services.centrum.DeleteDispatchRequest
354
- */
355
- export interface DeleteDispatchRequest {
356
- /**
357
- * @generated from protobuf field: int64 id = 1
358
- */
359
- id: number;
360
- }
361
- /**
362
- * @generated from protobuf message services.centrum.DeleteDispatchResponse
363
- */
364
- export interface DeleteDispatchResponse {
365
- }
366
- /**
367
- * @generated from protobuf message services.centrum.ListDispatchTargetJobsRequest
368
- */
369
- export interface ListDispatchTargetJobsRequest {
370
- }
371
- /**
372
- * @generated from protobuf message services.centrum.ListDispatchTargetJobsResponse
373
- */
374
- export interface ListDispatchTargetJobsResponse {
375
- /**
376
- * @generated from protobuf field: repeated resources.jobs.Job jobs = 1
377
- */
378
- jobs: Job[];
379
- }
380
- /**
381
- * @generated from protobuf message services.centrum.UpdateDispatchStatusRequest
382
- */
383
- export interface UpdateDispatchStatusRequest {
384
- /**
385
- * @generated from protobuf field: int64 dispatch_id = 1
386
- */
387
- dispatchId: number;
388
- /**
389
- * @generated from protobuf field: resources.centrum.dispatches.StatusDispatch status = 2
390
- */
391
- status: StatusDispatch;
392
- /**
393
- * @generated from protobuf field: optional string reason = 3
394
- */
395
- reason?: string;
396
- /**
397
- * @generated from protobuf field: optional string code = 4
398
- */
399
- code?: string;
400
- }
401
- /**
402
- * @generated from protobuf message services.centrum.UpdateDispatchStatusResponse
403
- */
404
- export interface UpdateDispatchStatusResponse {
405
- }
406
- /**
407
- * @generated from protobuf message services.centrum.AssignDispatchRequest
100
+ * @generated from protobuf message services.centrum.UpdateDispatchersRequest
408
101
  */
409
- export interface AssignDispatchRequest {
410
- /**
411
- * @generated from protobuf field: int64 dispatch_id = 1
412
- */
413
- dispatchId: number;
414
- /**
415
- * @generated from protobuf field: repeated int64 to_add = 2
416
- */
417
- toAdd: number[];
102
+ export interface UpdateDispatchersRequest {
418
103
  /**
419
- * @generated from protobuf field: repeated int64 to_remove = 3
104
+ * @generated from protobuf field: repeated int32 to_remove = 1
420
105
  */
421
106
  toRemove: number[];
422
- /**
423
- * @generated from protobuf field: optional bool forced = 4
424
- */
425
- forced?: boolean;
426
- }
427
- /**
428
- * @generated from protobuf message services.centrum.AssignDispatchResponse
429
- */
430
- export interface AssignDispatchResponse {
431
- }
432
- /**
433
- * @generated from protobuf message services.centrum.ListDispatchActivityResponse
434
- */
435
- export interface ListDispatchActivityResponse {
436
- /**
437
- * @generated from protobuf field: resources.common.database.PaginationResponse pagination = 1
438
- */
439
- pagination?: PaginationResponse;
440
- /**
441
- * @generated from protobuf field: repeated resources.centrum.dispatches.DispatchStatus activity = 2
442
- */
443
- activity: DispatchStatus[];
444
- }
445
- /**
446
- * @generated from protobuf message services.centrum.JoinUnitRequest
447
- */
448
- export interface JoinUnitRequest {
449
- /**
450
- * @generated from protobuf field: optional int64 unit_id = 1
451
- */
452
- unitId?: number;
453
- }
454
- /**
455
- * @generated from protobuf message services.centrum.JoinUnitResponse
456
- */
457
- export interface JoinUnitResponse {
458
- /**
459
- * @generated from protobuf field: resources.centrum.units.Unit unit = 1
460
- */
461
- unit?: Unit;
462
107
  }
463
108
  /**
464
- * @generated from protobuf message services.centrum.TakeDispatchRequest
109
+ * @generated from protobuf message services.centrum.UpdateDispatchersResponse
465
110
  */
466
- export interface TakeDispatchRequest {
467
- /**
468
- * @generated from protobuf field: repeated int64 dispatch_ids = 1
469
- */
470
- dispatchIds: number[];
471
- /**
472
- * @generated from protobuf field: resources.centrum.dispatches.TakeDispatchResp resp = 2
473
- */
474
- resp: TakeDispatchResp;
111
+ export interface UpdateDispatchersResponse {
475
112
  /**
476
- * @generated from protobuf field: optional string reason = 3
113
+ * @generated from protobuf field: resources.centrum.dispatchers.Dispatchers dispatchers = 1
477
114
  */
478
- reason?: string;
479
- }
480
- /**
481
- * @generated from protobuf message services.centrum.TakeDispatchResponse
482
- */
483
- export interface TakeDispatchResponse {
115
+ dispatchers?: Dispatchers;
484
116
  }
485
117
  /**
486
118
  * @generated from protobuf message services.centrum.StreamHandshake
@@ -517,1797 +149,109 @@ export interface LatestState {
517
149
  * @generated from protobuf field: repeated resources.centrum.units.Unit units = 3
518
150
  */
519
151
  units: Unit[];
520
- /**
521
- * @generated from protobuf field: repeated resources.centrum.dispatches.Dispatch dispatches = 4
522
- */
523
- dispatches: Dispatch[];
524
- }
525
- /**
526
- * @generated from protobuf message services.centrum.StreamRequest
527
- */
528
- export interface StreamRequest {
529
- }
530
- /**
531
- * @generated from protobuf message services.centrum.StreamResponse
532
- */
533
- export interface StreamResponse {
534
- /**
535
- * @generated from protobuf oneof: change
536
- */
537
- change: {
538
- oneofKind: "handshake";
539
- /**
540
- * @generated from protobuf field: services.centrum.StreamHandshake handshake = 1
541
- */
542
- handshake: StreamHandshake;
543
- } | {
544
- oneofKind: "latestState";
545
- /**
546
- * @generated from protobuf field: services.centrum.LatestState latest_state = 2
547
- */
548
- latestState: LatestState;
549
- } | {
550
- oneofKind: "settings";
551
- /**
552
- * @generated from protobuf field: resources.centrum.settings.Settings settings = 3
553
- */
554
- settings: Settings;
555
- } | {
556
- oneofKind: "access";
557
- /**
558
- * @generated from protobuf field: resources.centrum.settings.EffectiveAccess access = 4
559
- */
560
- access: EffectiveAccess;
561
- } | {
562
- oneofKind: "dispatchers";
563
- /**
564
- * @generated from protobuf field: resources.centrum.dispatchers.Dispatchers dispatchers = 5
565
- */
566
- dispatchers: Dispatchers;
567
- } | {
568
- oneofKind: "unitDeleted";
569
- /**
570
- * @generated from protobuf field: int64 unit_deleted = 6
571
- */
572
- unitDeleted: number;
573
- } | {
574
- oneofKind: "unitUpdated";
575
- /**
576
- * @generated from protobuf field: resources.centrum.units.Unit unit_updated = 7
577
- */
578
- unitUpdated: Unit;
579
- } | {
580
- oneofKind: "unitStatus";
581
- /**
582
- * @generated from protobuf field: resources.centrum.units.UnitStatus unit_status = 8
583
- */
584
- unitStatus: UnitStatus;
585
- } | {
586
- oneofKind: "dispatchDeleted";
587
- /**
588
- * @generated from protobuf field: int64 dispatch_deleted = 9
589
- */
590
- dispatchDeleted: number;
591
- } | {
592
- oneofKind: "dispatchUpdated";
593
- /**
594
- * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch_updated = 10
595
- */
596
- dispatchUpdated: Dispatch;
597
- } | {
598
- oneofKind: "dispatchStatus";
599
- /**
600
- * @generated from protobuf field: resources.centrum.dispatches.DispatchStatus dispatch_status = 11
601
- */
602
- dispatchStatus: DispatchStatus;
603
- } | {
604
- oneofKind: undefined;
605
- };
606
- }
607
- // @generated message type with reflection information, may provide speed optimized methods
608
- class ListDispatchActivityRequest$Type extends MessageType<ListDispatchActivityRequest> {
609
- constructor() {
610
- super("services.centrum.ListDispatchActivityRequest", [
611
- { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
612
- { no: 2, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
613
- ]);
614
- }
615
- create(value?: PartialMessage<ListDispatchActivityRequest>): ListDispatchActivityRequest {
616
- const message = globalThis.Object.create((this.messagePrototype!));
617
- message.id = 0;
618
- if (value !== undefined)
619
- reflectionMergePartial<ListDispatchActivityRequest>(this, message, value);
620
- return message;
621
- }
622
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDispatchActivityRequest): ListDispatchActivityRequest {
623
- let message = target ?? this.create(), end = reader.pos + length;
624
- while (reader.pos < end) {
625
- let [fieldNo, wireType] = reader.tag();
626
- switch (fieldNo) {
627
- case /* resources.common.database.PaginationRequest pagination */ 1:
628
- message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
629
- break;
630
- case /* int64 id */ 2:
631
- message.id = reader.int64().toNumber();
632
- break;
633
- default:
634
- let u = options.readUnknownField;
635
- if (u === "throw")
636
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
637
- let d = reader.skip(wireType);
638
- if (u !== false)
639
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
640
- }
641
- }
642
- return message;
643
- }
644
- internalBinaryWrite(message: ListDispatchActivityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
645
- /* resources.common.database.PaginationRequest pagination = 1; */
646
- if (message.pagination)
647
- PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
648
- /* int64 id = 2; */
649
- if (message.id !== 0)
650
- writer.tag(2, WireType.Varint).int64(message.id);
651
- let u = options.writeUnknownFields;
652
- if (u !== false)
653
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
654
- return writer;
655
- }
656
- }
657
- /**
658
- * @generated MessageType for protobuf message services.centrum.ListDispatchActivityRequest
659
- */
660
- export const ListDispatchActivityRequest = new ListDispatchActivityRequest$Type();
661
- // @generated message type with reflection information, may provide speed optimized methods
662
- class ListUnitActivityRequest$Type extends MessageType<ListUnitActivityRequest> {
663
- constructor() {
664
- super("services.centrum.ListUnitActivityRequest", [
665
- { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
666
- { no: 2, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
667
- ]);
668
- }
669
- create(value?: PartialMessage<ListUnitActivityRequest>): ListUnitActivityRequest {
670
- const message = globalThis.Object.create((this.messagePrototype!));
671
- message.id = 0;
672
- if (value !== undefined)
673
- reflectionMergePartial<ListUnitActivityRequest>(this, message, value);
674
- return message;
675
- }
676
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityRequest): ListUnitActivityRequest {
677
- let message = target ?? this.create(), end = reader.pos + length;
678
- while (reader.pos < end) {
679
- let [fieldNo, wireType] = reader.tag();
680
- switch (fieldNo) {
681
- case /* resources.common.database.PaginationRequest pagination */ 1:
682
- message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
683
- break;
684
- case /* int64 id */ 2:
685
- message.id = reader.int64().toNumber();
686
- break;
687
- default:
688
- let u = options.readUnknownField;
689
- if (u === "throw")
690
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
691
- let d = reader.skip(wireType);
692
- if (u !== false)
693
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
694
- }
695
- }
696
- return message;
697
- }
698
- internalBinaryWrite(message: ListUnitActivityRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
699
- /* resources.common.database.PaginationRequest pagination = 1; */
700
- if (message.pagination)
701
- PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
702
- /* int64 id = 2; */
703
- if (message.id !== 0)
704
- writer.tag(2, WireType.Varint).int64(message.id);
705
- let u = options.writeUnknownFields;
706
- if (u !== false)
707
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
708
- return writer;
709
- }
710
- }
711
- /**
712
- * @generated MessageType for protobuf message services.centrum.ListUnitActivityRequest
713
- */
714
- export const ListUnitActivityRequest = new ListUnitActivityRequest$Type();
715
- // @generated message type with reflection information, may provide speed optimized methods
716
- class GetSettingsRequest$Type extends MessageType<GetSettingsRequest> {
717
- constructor() {
718
- super("services.centrum.GetSettingsRequest", []);
719
- }
720
- create(value?: PartialMessage<GetSettingsRequest>): GetSettingsRequest {
721
- const message = globalThis.Object.create((this.messagePrototype!));
722
- if (value !== undefined)
723
- reflectionMergePartial<GetSettingsRequest>(this, message, value);
724
- return message;
725
- }
726
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSettingsRequest): GetSettingsRequest {
727
- let message = target ?? this.create(), end = reader.pos + length;
728
- while (reader.pos < end) {
729
- let [fieldNo, wireType] = reader.tag();
730
- switch (fieldNo) {
731
- default:
732
- let u = options.readUnknownField;
733
- if (u === "throw")
734
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
735
- let d = reader.skip(wireType);
736
- if (u !== false)
737
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
738
- }
739
- }
740
- return message;
741
- }
742
- internalBinaryWrite(message: GetSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
743
- let u = options.writeUnknownFields;
744
- if (u !== false)
745
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
746
- return writer;
747
- }
748
- }
749
- /**
750
- * @generated MessageType for protobuf message services.centrum.GetSettingsRequest
751
- */
752
- export const GetSettingsRequest = new GetSettingsRequest$Type();
753
- // @generated message type with reflection information, may provide speed optimized methods
754
- class GetSettingsResponse$Type extends MessageType<GetSettingsResponse> {
755
- constructor() {
756
- super("services.centrum.GetSettingsResponse", [
757
- { no: 1, name: "settings", kind: "message", T: () => Settings },
758
- { no: 2, name: "effective_access", kind: "message", T: () => EffectiveAccess }
759
- ]);
760
- }
761
- create(value?: PartialMessage<GetSettingsResponse>): GetSettingsResponse {
762
- const message = globalThis.Object.create((this.messagePrototype!));
763
- if (value !== undefined)
764
- reflectionMergePartial<GetSettingsResponse>(this, message, value);
765
- return message;
766
- }
767
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSettingsResponse): GetSettingsResponse {
768
- let message = target ?? this.create(), end = reader.pos + length;
769
- while (reader.pos < end) {
770
- let [fieldNo, wireType] = reader.tag();
771
- switch (fieldNo) {
772
- case /* resources.centrum.settings.Settings settings */ 1:
773
- message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
774
- break;
775
- case /* resources.centrum.settings.EffectiveAccess effective_access */ 2:
776
- message.effectiveAccess = EffectiveAccess.internalBinaryRead(reader, reader.uint32(), options, message.effectiveAccess);
777
- break;
778
- default:
779
- let u = options.readUnknownField;
780
- if (u === "throw")
781
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
782
- let d = reader.skip(wireType);
783
- if (u !== false)
784
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
785
- }
786
- }
787
- return message;
788
- }
789
- internalBinaryWrite(message: GetSettingsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
790
- /* resources.centrum.settings.Settings settings = 1; */
791
- if (message.settings)
792
- Settings.internalBinaryWrite(message.settings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
793
- /* resources.centrum.settings.EffectiveAccess effective_access = 2; */
794
- if (message.effectiveAccess)
795
- EffectiveAccess.internalBinaryWrite(message.effectiveAccess, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
796
- let u = options.writeUnknownFields;
797
- if (u !== false)
798
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
799
- return writer;
800
- }
801
- }
802
- /**
803
- * @generated MessageType for protobuf message services.centrum.GetSettingsResponse
804
- */
805
- export const GetSettingsResponse = new GetSettingsResponse$Type();
806
- // @generated message type with reflection information, may provide speed optimized methods
807
- class UpdateSettingsRequest$Type extends MessageType<UpdateSettingsRequest> {
808
- constructor() {
809
- super("services.centrum.UpdateSettingsRequest", [
810
- { no: 1, name: "settings", kind: "message", T: () => Settings }
811
- ]);
812
- }
813
- create(value?: PartialMessage<UpdateSettingsRequest>): UpdateSettingsRequest {
814
- const message = globalThis.Object.create((this.messagePrototype!));
815
- if (value !== undefined)
816
- reflectionMergePartial<UpdateSettingsRequest>(this, message, value);
817
- return message;
818
- }
819
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSettingsRequest): UpdateSettingsRequest {
820
- let message = target ?? this.create(), end = reader.pos + length;
821
- while (reader.pos < end) {
822
- let [fieldNo, wireType] = reader.tag();
823
- switch (fieldNo) {
824
- case /* resources.centrum.settings.Settings settings */ 1:
825
- message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
826
- break;
827
- default:
828
- let u = options.readUnknownField;
829
- if (u === "throw")
830
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
831
- let d = reader.skip(wireType);
832
- if (u !== false)
833
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
834
- }
835
- }
836
- return message;
837
- }
838
- internalBinaryWrite(message: UpdateSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
839
- /* resources.centrum.settings.Settings settings = 1; */
840
- if (message.settings)
841
- Settings.internalBinaryWrite(message.settings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
842
- let u = options.writeUnknownFields;
843
- if (u !== false)
844
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
845
- return writer;
846
- }
847
- }
848
- /**
849
- * @generated MessageType for protobuf message services.centrum.UpdateSettingsRequest
850
- */
851
- export const UpdateSettingsRequest = new UpdateSettingsRequest$Type();
852
- // @generated message type with reflection information, may provide speed optimized methods
853
- class UpdateSettingsResponse$Type extends MessageType<UpdateSettingsResponse> {
854
- constructor() {
855
- super("services.centrum.UpdateSettingsResponse", [
856
- { no: 1, name: "settings", kind: "message", T: () => Settings }
857
- ]);
858
- }
859
- create(value?: PartialMessage<UpdateSettingsResponse>): UpdateSettingsResponse {
860
- const message = globalThis.Object.create((this.messagePrototype!));
861
- if (value !== undefined)
862
- reflectionMergePartial<UpdateSettingsResponse>(this, message, value);
863
- return message;
864
- }
865
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSettingsResponse): UpdateSettingsResponse {
866
- let message = target ?? this.create(), end = reader.pos + length;
867
- while (reader.pos < end) {
868
- let [fieldNo, wireType] = reader.tag();
869
- switch (fieldNo) {
870
- case /* resources.centrum.settings.Settings settings */ 1:
871
- message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
872
- break;
873
- default:
874
- let u = options.readUnknownField;
875
- if (u === "throw")
876
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
877
- let d = reader.skip(wireType);
878
- if (u !== false)
879
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
880
- }
881
- }
882
- return message;
883
- }
884
- internalBinaryWrite(message: UpdateSettingsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
885
- /* resources.centrum.settings.Settings settings = 1; */
886
- if (message.settings)
887
- Settings.internalBinaryWrite(message.settings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
888
- let u = options.writeUnknownFields;
889
- if (u !== false)
890
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
891
- return writer;
892
- }
893
- }
894
- /**
895
- * @generated MessageType for protobuf message services.centrum.UpdateSettingsResponse
896
- */
897
- export const UpdateSettingsResponse = new UpdateSettingsResponse$Type();
898
- // @generated message type with reflection information, may provide speed optimized methods
899
- class ListUnitsRequest$Type extends MessageType<ListUnitsRequest> {
900
- constructor() {
901
- super("services.centrum.ListUnitsRequest", [
902
- { no: 1, name: "status", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } }
903
- ]);
904
- }
905
- create(value?: PartialMessage<ListUnitsRequest>): ListUnitsRequest {
906
- const message = globalThis.Object.create((this.messagePrototype!));
907
- message.status = [];
908
- if (value !== undefined)
909
- reflectionMergePartial<ListUnitsRequest>(this, message, value);
910
- return message;
911
- }
912
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitsRequest): ListUnitsRequest {
913
- let message = target ?? this.create(), end = reader.pos + length;
914
- while (reader.pos < end) {
915
- let [fieldNo, wireType] = reader.tag();
916
- switch (fieldNo) {
917
- case /* repeated resources.centrum.units.StatusUnit status */ 1:
918
- if (wireType === WireType.LengthDelimited)
919
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
920
- message.status.push(reader.int32());
921
- else
922
- message.status.push(reader.int32());
923
- break;
924
- default:
925
- let u = options.readUnknownField;
926
- if (u === "throw")
927
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
928
- let d = reader.skip(wireType);
929
- if (u !== false)
930
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
931
- }
932
- }
933
- return message;
934
- }
935
- internalBinaryWrite(message: ListUnitsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
936
- /* repeated resources.centrum.units.StatusUnit status = 1; */
937
- if (message.status.length) {
938
- writer.tag(1, WireType.LengthDelimited).fork();
939
- for (let i = 0; i < message.status.length; i++)
940
- writer.int32(message.status[i]);
941
- writer.join();
942
- }
943
- let u = options.writeUnknownFields;
944
- if (u !== false)
945
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
946
- return writer;
947
- }
948
- }
949
- /**
950
- * @generated MessageType for protobuf message services.centrum.ListUnitsRequest
951
- */
952
- export const ListUnitsRequest = new ListUnitsRequest$Type();
953
- // @generated message type with reflection information, may provide speed optimized methods
954
- class ListUnitsResponse$Type extends MessageType<ListUnitsResponse> {
955
- constructor() {
956
- super("services.centrum.ListUnitsResponse", [
957
- { no: 1, name: "units", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Unit, options: { "codegen.itemslen.enabled": true } }
958
- ]);
959
- }
960
- create(value?: PartialMessage<ListUnitsResponse>): ListUnitsResponse {
961
- const message = globalThis.Object.create((this.messagePrototype!));
962
- message.units = [];
963
- if (value !== undefined)
964
- reflectionMergePartial<ListUnitsResponse>(this, message, value);
965
- return message;
966
- }
967
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitsResponse): ListUnitsResponse {
968
- let message = target ?? this.create(), end = reader.pos + length;
969
- while (reader.pos < end) {
970
- let [fieldNo, wireType] = reader.tag();
971
- switch (fieldNo) {
972
- case /* repeated resources.centrum.units.Unit units */ 1:
973
- message.units.push(Unit.internalBinaryRead(reader, reader.uint32(), options));
974
- break;
975
- default:
976
- let u = options.readUnknownField;
977
- if (u === "throw")
978
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
979
- let d = reader.skip(wireType);
980
- if (u !== false)
981
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
982
- }
983
- }
984
- return message;
985
- }
986
- internalBinaryWrite(message: ListUnitsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
987
- /* repeated resources.centrum.units.Unit units = 1; */
988
- for (let i = 0; i < message.units.length; i++)
989
- Unit.internalBinaryWrite(message.units[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
990
- let u = options.writeUnknownFields;
991
- if (u !== false)
992
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
993
- return writer;
994
- }
995
- }
996
- /**
997
- * @generated MessageType for protobuf message services.centrum.ListUnitsResponse
998
- */
999
- export const ListUnitsResponse = new ListUnitsResponse$Type();
1000
- // @generated message type with reflection information, may provide speed optimized methods
1001
- class CreateOrUpdateUnitRequest$Type extends MessageType<CreateOrUpdateUnitRequest> {
1002
- constructor() {
1003
- super("services.centrum.CreateOrUpdateUnitRequest", [
1004
- { no: 1, name: "unit", kind: "message", T: () => Unit, options: { "buf.validate.field": { required: true } } }
1005
- ]);
1006
- }
1007
- create(value?: PartialMessage<CreateOrUpdateUnitRequest>): CreateOrUpdateUnitRequest {
1008
- const message = globalThis.Object.create((this.messagePrototype!));
1009
- if (value !== undefined)
1010
- reflectionMergePartial<CreateOrUpdateUnitRequest>(this, message, value);
1011
- return message;
1012
- }
1013
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateOrUpdateUnitRequest): CreateOrUpdateUnitRequest {
1014
- let message = target ?? this.create(), end = reader.pos + length;
1015
- while (reader.pos < end) {
1016
- let [fieldNo, wireType] = reader.tag();
1017
- switch (fieldNo) {
1018
- case /* resources.centrum.units.Unit unit */ 1:
1019
- message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
1020
- break;
1021
- default:
1022
- let u = options.readUnknownField;
1023
- if (u === "throw")
1024
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1025
- let d = reader.skip(wireType);
1026
- if (u !== false)
1027
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1028
- }
1029
- }
1030
- return message;
1031
- }
1032
- internalBinaryWrite(message: CreateOrUpdateUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1033
- /* resources.centrum.units.Unit unit = 1; */
1034
- if (message.unit)
1035
- Unit.internalBinaryWrite(message.unit, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1036
- let u = options.writeUnknownFields;
1037
- if (u !== false)
1038
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1039
- return writer;
1040
- }
1041
- }
1042
- /**
1043
- * @generated MessageType for protobuf message services.centrum.CreateOrUpdateUnitRequest
1044
- */
1045
- export const CreateOrUpdateUnitRequest = new CreateOrUpdateUnitRequest$Type();
1046
- // @generated message type with reflection information, may provide speed optimized methods
1047
- class CreateOrUpdateUnitResponse$Type extends MessageType<CreateOrUpdateUnitResponse> {
1048
- constructor() {
1049
- super("services.centrum.CreateOrUpdateUnitResponse", [
1050
- { no: 1, name: "unit", kind: "message", T: () => Unit }
1051
- ]);
1052
- }
1053
- create(value?: PartialMessage<CreateOrUpdateUnitResponse>): CreateOrUpdateUnitResponse {
1054
- const message = globalThis.Object.create((this.messagePrototype!));
1055
- if (value !== undefined)
1056
- reflectionMergePartial<CreateOrUpdateUnitResponse>(this, message, value);
1057
- return message;
1058
- }
1059
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateOrUpdateUnitResponse): CreateOrUpdateUnitResponse {
1060
- let message = target ?? this.create(), end = reader.pos + length;
1061
- while (reader.pos < end) {
1062
- let [fieldNo, wireType] = reader.tag();
1063
- switch (fieldNo) {
1064
- case /* resources.centrum.units.Unit unit */ 1:
1065
- message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
1066
- break;
1067
- default:
1068
- let u = options.readUnknownField;
1069
- if (u === "throw")
1070
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1071
- let d = reader.skip(wireType);
1072
- if (u !== false)
1073
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1074
- }
1075
- }
1076
- return message;
1077
- }
1078
- internalBinaryWrite(message: CreateOrUpdateUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1079
- /* resources.centrum.units.Unit unit = 1; */
1080
- if (message.unit)
1081
- Unit.internalBinaryWrite(message.unit, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1082
- let u = options.writeUnknownFields;
1083
- if (u !== false)
1084
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1085
- return writer;
1086
- }
1087
- }
1088
- /**
1089
- * @generated MessageType for protobuf message services.centrum.CreateOrUpdateUnitResponse
1090
- */
1091
- export const CreateOrUpdateUnitResponse = new CreateOrUpdateUnitResponse$Type();
1092
- // @generated message type with reflection information, may provide speed optimized methods
1093
- class DeleteUnitRequest$Type extends MessageType<DeleteUnitRequest> {
1094
- constructor() {
1095
- super("services.centrum.DeleteUnitRequest", [
1096
- { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
1097
- ]);
1098
- }
1099
- create(value?: PartialMessage<DeleteUnitRequest>): DeleteUnitRequest {
1100
- const message = globalThis.Object.create((this.messagePrototype!));
1101
- message.unitId = 0;
1102
- if (value !== undefined)
1103
- reflectionMergePartial<DeleteUnitRequest>(this, message, value);
1104
- return message;
1105
- }
1106
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUnitRequest): DeleteUnitRequest {
1107
- let message = target ?? this.create(), end = reader.pos + length;
1108
- while (reader.pos < end) {
1109
- let [fieldNo, wireType] = reader.tag();
1110
- switch (fieldNo) {
1111
- case /* int64 unit_id */ 1:
1112
- message.unitId = reader.int64().toNumber();
1113
- break;
1114
- default:
1115
- let u = options.readUnknownField;
1116
- if (u === "throw")
1117
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1118
- let d = reader.skip(wireType);
1119
- if (u !== false)
1120
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1121
- }
1122
- }
1123
- return message;
1124
- }
1125
- internalBinaryWrite(message: DeleteUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1126
- /* int64 unit_id = 1; */
1127
- if (message.unitId !== 0)
1128
- writer.tag(1, WireType.Varint).int64(message.unitId);
1129
- let u = options.writeUnknownFields;
1130
- if (u !== false)
1131
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1132
- return writer;
1133
- }
1134
- }
1135
- /**
1136
- * @generated MessageType for protobuf message services.centrum.DeleteUnitRequest
1137
- */
1138
- export const DeleteUnitRequest = new DeleteUnitRequest$Type();
1139
- // @generated message type with reflection information, may provide speed optimized methods
1140
- class DeleteUnitResponse$Type extends MessageType<DeleteUnitResponse> {
1141
- constructor() {
1142
- super("services.centrum.DeleteUnitResponse", []);
1143
- }
1144
- create(value?: PartialMessage<DeleteUnitResponse>): DeleteUnitResponse {
1145
- const message = globalThis.Object.create((this.messagePrototype!));
1146
- if (value !== undefined)
1147
- reflectionMergePartial<DeleteUnitResponse>(this, message, value);
1148
- return message;
1149
- }
1150
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteUnitResponse): DeleteUnitResponse {
1151
- let message = target ?? this.create(), end = reader.pos + length;
1152
- while (reader.pos < end) {
1153
- let [fieldNo, wireType] = reader.tag();
1154
- switch (fieldNo) {
1155
- default:
1156
- let u = options.readUnknownField;
1157
- if (u === "throw")
1158
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1159
- let d = reader.skip(wireType);
1160
- if (u !== false)
1161
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1162
- }
1163
- }
1164
- return message;
1165
- }
1166
- internalBinaryWrite(message: DeleteUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1167
- let u = options.writeUnknownFields;
1168
- if (u !== false)
1169
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1170
- return writer;
1171
- }
1172
- }
1173
- /**
1174
- * @generated MessageType for protobuf message services.centrum.DeleteUnitResponse
1175
- */
1176
- export const DeleteUnitResponse = new DeleteUnitResponse$Type();
1177
- // @generated message type with reflection information, may provide speed optimized methods
1178
- class UpdateUnitStatusRequest$Type extends MessageType<UpdateUnitStatusRequest> {
1179
- constructor() {
1180
- super("services.centrum.UpdateUnitStatusRequest", [
1181
- { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
1182
- { no: 2, name: "status", kind: "enum", T: () => ["resources.centrum.units.StatusUnit", StatusUnit, "STATUS_UNIT_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
1183
- { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
1184
- { no: 4, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "20" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
1185
- ]);
1186
- }
1187
- create(value?: PartialMessage<UpdateUnitStatusRequest>): UpdateUnitStatusRequest {
1188
- const message = globalThis.Object.create((this.messagePrototype!));
1189
- message.unitId = 0;
1190
- message.status = 0;
1191
- if (value !== undefined)
1192
- reflectionMergePartial<UpdateUnitStatusRequest>(this, message, value);
1193
- return message;
1194
- }
1195
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusRequest): UpdateUnitStatusRequest {
1196
- let message = target ?? this.create(), end = reader.pos + length;
1197
- while (reader.pos < end) {
1198
- let [fieldNo, wireType] = reader.tag();
1199
- switch (fieldNo) {
1200
- case /* int64 unit_id */ 1:
1201
- message.unitId = reader.int64().toNumber();
1202
- break;
1203
- case /* resources.centrum.units.StatusUnit status */ 2:
1204
- message.status = reader.int32();
1205
- break;
1206
- case /* optional string reason */ 3:
1207
- message.reason = reader.string();
1208
- break;
1209
- case /* optional string code */ 4:
1210
- message.code = reader.string();
1211
- break;
1212
- default:
1213
- let u = options.readUnknownField;
1214
- if (u === "throw")
1215
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1216
- let d = reader.skip(wireType);
1217
- if (u !== false)
1218
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1219
- }
1220
- }
1221
- return message;
1222
- }
1223
- internalBinaryWrite(message: UpdateUnitStatusRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1224
- /* int64 unit_id = 1; */
1225
- if (message.unitId !== 0)
1226
- writer.tag(1, WireType.Varint).int64(message.unitId);
1227
- /* resources.centrum.units.StatusUnit status = 2; */
1228
- if (message.status !== 0)
1229
- writer.tag(2, WireType.Varint).int32(message.status);
1230
- /* optional string reason = 3; */
1231
- if (message.reason !== undefined)
1232
- writer.tag(3, WireType.LengthDelimited).string(message.reason);
1233
- /* optional string code = 4; */
1234
- if (message.code !== undefined)
1235
- writer.tag(4, WireType.LengthDelimited).string(message.code);
1236
- let u = options.writeUnknownFields;
1237
- if (u !== false)
1238
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1239
- return writer;
1240
- }
1241
- }
1242
- /**
1243
- * @generated MessageType for protobuf message services.centrum.UpdateUnitStatusRequest
1244
- */
1245
- export const UpdateUnitStatusRequest = new UpdateUnitStatusRequest$Type();
1246
- // @generated message type with reflection information, may provide speed optimized methods
1247
- class UpdateUnitStatusResponse$Type extends MessageType<UpdateUnitStatusResponse> {
1248
- constructor() {
1249
- super("services.centrum.UpdateUnitStatusResponse", []);
1250
- }
1251
- create(value?: PartialMessage<UpdateUnitStatusResponse>): UpdateUnitStatusResponse {
1252
- const message = globalThis.Object.create((this.messagePrototype!));
1253
- if (value !== undefined)
1254
- reflectionMergePartial<UpdateUnitStatusResponse>(this, message, value);
1255
- return message;
1256
- }
1257
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateUnitStatusResponse): UpdateUnitStatusResponse {
1258
- let message = target ?? this.create(), end = reader.pos + length;
1259
- while (reader.pos < end) {
1260
- let [fieldNo, wireType] = reader.tag();
1261
- switch (fieldNo) {
1262
- default:
1263
- let u = options.readUnknownField;
1264
- if (u === "throw")
1265
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1266
- let d = reader.skip(wireType);
1267
- if (u !== false)
1268
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1269
- }
1270
- }
1271
- return message;
1272
- }
1273
- internalBinaryWrite(message: UpdateUnitStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1274
- let u = options.writeUnknownFields;
1275
- if (u !== false)
1276
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1277
- return writer;
1278
- }
1279
- }
1280
- /**
1281
- * @generated MessageType for protobuf message services.centrum.UpdateUnitStatusResponse
1282
- */
1283
- export const UpdateUnitStatusResponse = new UpdateUnitStatusResponse$Type();
1284
- // @generated message type with reflection information, may provide speed optimized methods
1285
- class AssignUnitRequest$Type extends MessageType<AssignUnitRequest> {
1286
- constructor() {
1287
- super("services.centrum.AssignUnitRequest", [
1288
- { no: 1, name: "unit_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
1289
- { no: 2, name: "to_add", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ },
1290
- { no: 3, name: "to_remove", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/ }
1291
- ]);
1292
- }
1293
- create(value?: PartialMessage<AssignUnitRequest>): AssignUnitRequest {
1294
- const message = globalThis.Object.create((this.messagePrototype!));
1295
- message.unitId = 0;
1296
- message.toAdd = [];
1297
- message.toRemove = [];
1298
- if (value !== undefined)
1299
- reflectionMergePartial<AssignUnitRequest>(this, message, value);
1300
- return message;
1301
- }
1302
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssignUnitRequest): AssignUnitRequest {
1303
- let message = target ?? this.create(), end = reader.pos + length;
1304
- while (reader.pos < end) {
1305
- let [fieldNo, wireType] = reader.tag();
1306
- switch (fieldNo) {
1307
- case /* int64 unit_id */ 1:
1308
- message.unitId = reader.int64().toNumber();
1309
- break;
1310
- case /* repeated int32 to_add */ 2:
1311
- if (wireType === WireType.LengthDelimited)
1312
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
1313
- message.toAdd.push(reader.int32());
1314
- else
1315
- message.toAdd.push(reader.int32());
1316
- break;
1317
- case /* repeated int32 to_remove */ 3:
1318
- if (wireType === WireType.LengthDelimited)
1319
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
1320
- message.toRemove.push(reader.int32());
1321
- else
1322
- message.toRemove.push(reader.int32());
1323
- break;
1324
- default:
1325
- let u = options.readUnknownField;
1326
- if (u === "throw")
1327
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1328
- let d = reader.skip(wireType);
1329
- if (u !== false)
1330
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1331
- }
1332
- }
1333
- return message;
1334
- }
1335
- internalBinaryWrite(message: AssignUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1336
- /* int64 unit_id = 1; */
1337
- if (message.unitId !== 0)
1338
- writer.tag(1, WireType.Varint).int64(message.unitId);
1339
- /* repeated int32 to_add = 2; */
1340
- if (message.toAdd.length) {
1341
- writer.tag(2, WireType.LengthDelimited).fork();
1342
- for (let i = 0; i < message.toAdd.length; i++)
1343
- writer.int32(message.toAdd[i]);
1344
- writer.join();
1345
- }
1346
- /* repeated int32 to_remove = 3; */
1347
- if (message.toRemove.length) {
1348
- writer.tag(3, WireType.LengthDelimited).fork();
1349
- for (let i = 0; i < message.toRemove.length; i++)
1350
- writer.int32(message.toRemove[i]);
1351
- writer.join();
1352
- }
1353
- let u = options.writeUnknownFields;
1354
- if (u !== false)
1355
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1356
- return writer;
1357
- }
1358
- }
1359
- /**
1360
- * @generated MessageType for protobuf message services.centrum.AssignUnitRequest
1361
- */
1362
- export const AssignUnitRequest = new AssignUnitRequest$Type();
1363
- // @generated message type with reflection information, may provide speed optimized methods
1364
- class AssignUnitResponse$Type extends MessageType<AssignUnitResponse> {
1365
- constructor() {
1366
- super("services.centrum.AssignUnitResponse", []);
1367
- }
1368
- create(value?: PartialMessage<AssignUnitResponse>): AssignUnitResponse {
1369
- const message = globalThis.Object.create((this.messagePrototype!));
1370
- if (value !== undefined)
1371
- reflectionMergePartial<AssignUnitResponse>(this, message, value);
1372
- return message;
1373
- }
1374
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssignUnitResponse): AssignUnitResponse {
1375
- let message = target ?? this.create(), end = reader.pos + length;
1376
- while (reader.pos < end) {
1377
- let [fieldNo, wireType] = reader.tag();
1378
- switch (fieldNo) {
1379
- default:
1380
- let u = options.readUnknownField;
1381
- if (u === "throw")
1382
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1383
- let d = reader.skip(wireType);
1384
- if (u !== false)
1385
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1386
- }
1387
- }
1388
- return message;
1389
- }
1390
- internalBinaryWrite(message: AssignUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1391
- let u = options.writeUnknownFields;
1392
- if (u !== false)
1393
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1394
- return writer;
1395
- }
1396
- }
1397
- /**
1398
- * @generated MessageType for protobuf message services.centrum.AssignUnitResponse
1399
- */
1400
- export const AssignUnitResponse = new AssignUnitResponse$Type();
1401
- // @generated message type with reflection information, may provide speed optimized methods
1402
- class GetDispatchHeatmapRequest$Type extends MessageType<GetDispatchHeatmapRequest> {
1403
- constructor() {
1404
- super("services.centrum.GetDispatchHeatmapRequest", []);
1405
- }
1406
- create(value?: PartialMessage<GetDispatchHeatmapRequest>): GetDispatchHeatmapRequest {
1407
- const message = globalThis.Object.create((this.messagePrototype!));
1408
- if (value !== undefined)
1409
- reflectionMergePartial<GetDispatchHeatmapRequest>(this, message, value);
1410
- return message;
1411
- }
1412
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDispatchHeatmapRequest): GetDispatchHeatmapRequest {
1413
- let message = target ?? this.create(), end = reader.pos + length;
1414
- while (reader.pos < end) {
1415
- let [fieldNo, wireType] = reader.tag();
1416
- switch (fieldNo) {
1417
- default:
1418
- let u = options.readUnknownField;
1419
- if (u === "throw")
1420
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1421
- let d = reader.skip(wireType);
1422
- if (u !== false)
1423
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1424
- }
1425
- }
1426
- return message;
1427
- }
1428
- internalBinaryWrite(message: GetDispatchHeatmapRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1429
- let u = options.writeUnknownFields;
1430
- if (u !== false)
1431
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1432
- return writer;
1433
- }
1434
- }
1435
- /**
1436
- * @generated MessageType for protobuf message services.centrum.GetDispatchHeatmapRequest
1437
- */
1438
- export const GetDispatchHeatmapRequest = new GetDispatchHeatmapRequest$Type();
1439
- // @generated message type with reflection information, may provide speed optimized methods
1440
- class GetDispatchHeatmapResponse$Type extends MessageType<GetDispatchHeatmapResponse> {
1441
- constructor() {
1442
- super("services.centrum.GetDispatchHeatmapResponse", [
1443
- { no: 1, name: "max_entries", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
1444
- { no: 2, name: "entries", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HeatmapEntry }
1445
- ]);
1446
- }
1447
- create(value?: PartialMessage<GetDispatchHeatmapResponse>): GetDispatchHeatmapResponse {
1448
- const message = globalThis.Object.create((this.messagePrototype!));
1449
- message.maxEntries = 0;
1450
- message.entries = [];
1451
- if (value !== undefined)
1452
- reflectionMergePartial<GetDispatchHeatmapResponse>(this, message, value);
1453
- return message;
1454
- }
1455
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDispatchHeatmapResponse): GetDispatchHeatmapResponse {
1456
- let message = target ?? this.create(), end = reader.pos + length;
1457
- while (reader.pos < end) {
1458
- let [fieldNo, wireType] = reader.tag();
1459
- switch (fieldNo) {
1460
- case /* int32 max_entries */ 1:
1461
- message.maxEntries = reader.int32();
1462
- break;
1463
- case /* repeated resources.livemap.heatmap.HeatmapEntry entries */ 2:
1464
- message.entries.push(HeatmapEntry.internalBinaryRead(reader, reader.uint32(), options));
1465
- break;
1466
- default:
1467
- let u = options.readUnknownField;
1468
- if (u === "throw")
1469
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1470
- let d = reader.skip(wireType);
1471
- if (u !== false)
1472
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1473
- }
1474
- }
1475
- return message;
1476
- }
1477
- internalBinaryWrite(message: GetDispatchHeatmapResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1478
- /* int32 max_entries = 1; */
1479
- if (message.maxEntries !== 0)
1480
- writer.tag(1, WireType.Varint).int32(message.maxEntries);
1481
- /* repeated resources.livemap.heatmap.HeatmapEntry entries = 2; */
1482
- for (let i = 0; i < message.entries.length; i++)
1483
- HeatmapEntry.internalBinaryWrite(message.entries[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1484
- let u = options.writeUnknownFields;
1485
- if (u !== false)
1486
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1487
- return writer;
1488
- }
1489
- }
1490
- /**
1491
- * @generated MessageType for protobuf message services.centrum.GetDispatchHeatmapResponse
1492
- */
1493
- export const GetDispatchHeatmapResponse = new GetDispatchHeatmapResponse$Type();
1494
- // @generated message type with reflection information, may provide speed optimized methods
1495
- class UpdateDispatchersRequest$Type extends MessageType<UpdateDispatchersRequest> {
1496
- constructor() {
1497
- super("services.centrum.UpdateDispatchersRequest", [
1498
- { no: 1, name: "to_remove", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "10" } } } }
1499
- ]);
1500
- }
1501
- create(value?: PartialMessage<UpdateDispatchersRequest>): UpdateDispatchersRequest {
1502
- const message = globalThis.Object.create((this.messagePrototype!));
1503
- message.toRemove = [];
1504
- if (value !== undefined)
1505
- reflectionMergePartial<UpdateDispatchersRequest>(this, message, value);
1506
- return message;
1507
- }
1508
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchersRequest): UpdateDispatchersRequest {
1509
- let message = target ?? this.create(), end = reader.pos + length;
1510
- while (reader.pos < end) {
1511
- let [fieldNo, wireType] = reader.tag();
1512
- switch (fieldNo) {
1513
- case /* repeated int32 to_remove */ 1:
1514
- if (wireType === WireType.LengthDelimited)
1515
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
1516
- message.toRemove.push(reader.int32());
1517
- else
1518
- message.toRemove.push(reader.int32());
1519
- break;
1520
- default:
1521
- let u = options.readUnknownField;
1522
- if (u === "throw")
1523
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1524
- let d = reader.skip(wireType);
1525
- if (u !== false)
1526
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1527
- }
1528
- }
1529
- return message;
1530
- }
1531
- internalBinaryWrite(message: UpdateDispatchersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1532
- /* repeated int32 to_remove = 1; */
1533
- if (message.toRemove.length) {
1534
- writer.tag(1, WireType.LengthDelimited).fork();
1535
- for (let i = 0; i < message.toRemove.length; i++)
1536
- writer.int32(message.toRemove[i]);
1537
- writer.join();
1538
- }
1539
- let u = options.writeUnknownFields;
1540
- if (u !== false)
1541
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1542
- return writer;
1543
- }
1544
- }
1545
- /**
1546
- * @generated MessageType for protobuf message services.centrum.UpdateDispatchersRequest
1547
- */
1548
- export const UpdateDispatchersRequest = new UpdateDispatchersRequest$Type();
1549
- // @generated message type with reflection information, may provide speed optimized methods
1550
- class UpdateDispatchersResponse$Type extends MessageType<UpdateDispatchersResponse> {
1551
- constructor() {
1552
- super("services.centrum.UpdateDispatchersResponse", [
1553
- { no: 1, name: "dispatchers", kind: "message", T: () => Dispatchers }
1554
- ]);
1555
- }
1556
- create(value?: PartialMessage<UpdateDispatchersResponse>): UpdateDispatchersResponse {
1557
- const message = globalThis.Object.create((this.messagePrototype!));
1558
- if (value !== undefined)
1559
- reflectionMergePartial<UpdateDispatchersResponse>(this, message, value);
1560
- return message;
1561
- }
1562
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchersResponse): UpdateDispatchersResponse {
1563
- let message = target ?? this.create(), end = reader.pos + length;
1564
- while (reader.pos < end) {
1565
- let [fieldNo, wireType] = reader.tag();
1566
- switch (fieldNo) {
1567
- case /* resources.centrum.dispatchers.Dispatchers dispatchers */ 1:
1568
- message.dispatchers = Dispatchers.internalBinaryRead(reader, reader.uint32(), options, message.dispatchers);
1569
- break;
1570
- default:
1571
- let u = options.readUnknownField;
1572
- if (u === "throw")
1573
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1574
- let d = reader.skip(wireType);
1575
- if (u !== false)
1576
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1577
- }
1578
- }
1579
- return message;
1580
- }
1581
- internalBinaryWrite(message: UpdateDispatchersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1582
- /* resources.centrum.dispatchers.Dispatchers dispatchers = 1; */
1583
- if (message.dispatchers)
1584
- Dispatchers.internalBinaryWrite(message.dispatchers, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1585
- let u = options.writeUnknownFields;
1586
- if (u !== false)
1587
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1588
- return writer;
1589
- }
1590
- }
1591
- /**
1592
- * @generated MessageType for protobuf message services.centrum.UpdateDispatchersResponse
1593
- */
1594
- export const UpdateDispatchersResponse = new UpdateDispatchersResponse$Type();
1595
- // @generated message type with reflection information, may provide speed optimized methods
1596
- class ListUnitActivityResponse$Type extends MessageType<ListUnitActivityResponse> {
1597
- constructor() {
1598
- super("services.centrum.ListUnitActivityResponse", [
1599
- { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
1600
- { no: 2, name: "activity", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => UnitStatus, options: { "codegen.itemslen.enabled": true } }
1601
- ]);
1602
- }
1603
- create(value?: PartialMessage<ListUnitActivityResponse>): ListUnitActivityResponse {
1604
- const message = globalThis.Object.create((this.messagePrototype!));
1605
- message.activity = [];
1606
- if (value !== undefined)
1607
- reflectionMergePartial<ListUnitActivityResponse>(this, message, value);
1608
- return message;
1609
- }
1610
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUnitActivityResponse): ListUnitActivityResponse {
1611
- let message = target ?? this.create(), end = reader.pos + length;
1612
- while (reader.pos < end) {
1613
- let [fieldNo, wireType] = reader.tag();
1614
- switch (fieldNo) {
1615
- case /* resources.common.database.PaginationResponse pagination */ 1:
1616
- message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
1617
- break;
1618
- case /* repeated resources.centrum.units.UnitStatus activity */ 2:
1619
- message.activity.push(UnitStatus.internalBinaryRead(reader, reader.uint32(), options));
1620
- break;
1621
- default:
1622
- let u = options.readUnknownField;
1623
- if (u === "throw")
1624
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1625
- let d = reader.skip(wireType);
1626
- if (u !== false)
1627
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1628
- }
1629
- }
1630
- return message;
1631
- }
1632
- internalBinaryWrite(message: ListUnitActivityResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1633
- /* resources.common.database.PaginationResponse pagination = 1; */
1634
- if (message.pagination)
1635
- PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1636
- /* repeated resources.centrum.units.UnitStatus activity = 2; */
1637
- for (let i = 0; i < message.activity.length; i++)
1638
- UnitStatus.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1639
- let u = options.writeUnknownFields;
1640
- if (u !== false)
1641
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1642
- return writer;
1643
- }
1644
- }
1645
- /**
1646
- * @generated MessageType for protobuf message services.centrum.ListUnitActivityResponse
1647
- */
1648
- export const ListUnitActivityResponse = new ListUnitActivityResponse$Type();
1649
- // @generated message type with reflection information, may provide speed optimized methods
1650
- class TakeControlRequest$Type extends MessageType<TakeControlRequest> {
1651
- constructor() {
1652
- super("services.centrum.TakeControlRequest", [
1653
- { no: 1, name: "signon", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
1654
- ]);
1655
- }
1656
- create(value?: PartialMessage<TakeControlRequest>): TakeControlRequest {
1657
- const message = globalThis.Object.create((this.messagePrototype!));
1658
- message.signon = false;
1659
- if (value !== undefined)
1660
- reflectionMergePartial<TakeControlRequest>(this, message, value);
1661
- return message;
1662
- }
1663
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TakeControlRequest): TakeControlRequest {
1664
- let message = target ?? this.create(), end = reader.pos + length;
1665
- while (reader.pos < end) {
1666
- let [fieldNo, wireType] = reader.tag();
1667
- switch (fieldNo) {
1668
- case /* bool signon */ 1:
1669
- message.signon = reader.bool();
1670
- break;
1671
- default:
1672
- let u = options.readUnknownField;
1673
- if (u === "throw")
1674
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1675
- let d = reader.skip(wireType);
1676
- if (u !== false)
1677
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1678
- }
1679
- }
1680
- return message;
1681
- }
1682
- internalBinaryWrite(message: TakeControlRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1683
- /* bool signon = 1; */
1684
- if (message.signon !== false)
1685
- writer.tag(1, WireType.Varint).bool(message.signon);
1686
- let u = options.writeUnknownFields;
1687
- if (u !== false)
1688
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1689
- return writer;
1690
- }
1691
- }
1692
- /**
1693
- * @generated MessageType for protobuf message services.centrum.TakeControlRequest
1694
- */
1695
- export const TakeControlRequest = new TakeControlRequest$Type();
1696
- // @generated message type with reflection information, may provide speed optimized methods
1697
- class TakeControlResponse$Type extends MessageType<TakeControlResponse> {
1698
- constructor() {
1699
- super("services.centrum.TakeControlResponse", []);
1700
- }
1701
- create(value?: PartialMessage<TakeControlResponse>): TakeControlResponse {
1702
- const message = globalThis.Object.create((this.messagePrototype!));
1703
- if (value !== undefined)
1704
- reflectionMergePartial<TakeControlResponse>(this, message, value);
1705
- return message;
1706
- }
1707
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TakeControlResponse): TakeControlResponse {
1708
- let message = target ?? this.create(), end = reader.pos + length;
1709
- while (reader.pos < end) {
1710
- let [fieldNo, wireType] = reader.tag();
1711
- switch (fieldNo) {
1712
- default:
1713
- let u = options.readUnknownField;
1714
- if (u === "throw")
1715
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1716
- let d = reader.skip(wireType);
1717
- if (u !== false)
1718
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1719
- }
1720
- }
1721
- return message;
1722
- }
1723
- internalBinaryWrite(message: TakeControlResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1724
- let u = options.writeUnknownFields;
1725
- if (u !== false)
1726
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1727
- return writer;
1728
- }
1729
- }
1730
- /**
1731
- * @generated MessageType for protobuf message services.centrum.TakeControlResponse
1732
- */
1733
- export const TakeControlResponse = new TakeControlResponse$Type();
1734
- // @generated message type with reflection information, may provide speed optimized methods
1735
- class ListDispatchesRequest$Type extends MessageType<ListDispatchesRequest> {
1736
- constructor() {
1737
- super("services.centrum.ListDispatchesRequest", [
1738
- { no: 1, name: "pagination", kind: "message", T: () => PaginationRequest, options: { "buf.validate.field": { required: true } } },
1739
- { no: 2, name: "status", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.dispatches.StatusDispatch", StatusDispatch, "STATUS_DISPATCH_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } },
1740
- { no: 3, name: "not_status", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["resources.centrum.dispatches.StatusDispatch", StatusDispatch, "STATUS_DISPATCH_"], options: { "buf.validate.field": { repeated: { items: { enum: { definedOnly: true } } } } } },
1741
- { no: 4, name: "ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { maxItems: "10" } } } },
1742
- { no: 5, name: "postal", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "12" } } } }
1743
- ]);
1744
- }
1745
- create(value?: PartialMessage<ListDispatchesRequest>): ListDispatchesRequest {
1746
- const message = globalThis.Object.create((this.messagePrototype!));
1747
- message.status = [];
1748
- message.notStatus = [];
1749
- message.ids = [];
1750
- if (value !== undefined)
1751
- reflectionMergePartial<ListDispatchesRequest>(this, message, value);
1752
- return message;
1753
- }
1754
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDispatchesRequest): ListDispatchesRequest {
1755
- let message = target ?? this.create(), end = reader.pos + length;
1756
- while (reader.pos < end) {
1757
- let [fieldNo, wireType] = reader.tag();
1758
- switch (fieldNo) {
1759
- case /* resources.common.database.PaginationRequest pagination */ 1:
1760
- message.pagination = PaginationRequest.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
1761
- break;
1762
- case /* repeated resources.centrum.dispatches.StatusDispatch status */ 2:
1763
- if (wireType === WireType.LengthDelimited)
1764
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
1765
- message.status.push(reader.int32());
1766
- else
1767
- message.status.push(reader.int32());
1768
- break;
1769
- case /* repeated resources.centrum.dispatches.StatusDispatch not_status */ 3:
1770
- if (wireType === WireType.LengthDelimited)
1771
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
1772
- message.notStatus.push(reader.int32());
1773
- else
1774
- message.notStatus.push(reader.int32());
1775
- break;
1776
- case /* repeated int64 ids */ 4:
1777
- if (wireType === WireType.LengthDelimited)
1778
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
1779
- message.ids.push(reader.int64().toNumber());
1780
- else
1781
- message.ids.push(reader.int64().toNumber());
1782
- break;
1783
- case /* optional string postal */ 5:
1784
- message.postal = reader.string();
1785
- break;
1786
- default:
1787
- let u = options.readUnknownField;
1788
- if (u === "throw")
1789
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1790
- let d = reader.skip(wireType);
1791
- if (u !== false)
1792
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1793
- }
1794
- }
1795
- return message;
1796
- }
1797
- internalBinaryWrite(message: ListDispatchesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1798
- /* resources.common.database.PaginationRequest pagination = 1; */
1799
- if (message.pagination)
1800
- PaginationRequest.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1801
- /* repeated resources.centrum.dispatches.StatusDispatch status = 2; */
1802
- if (message.status.length) {
1803
- writer.tag(2, WireType.LengthDelimited).fork();
1804
- for (let i = 0; i < message.status.length; i++)
1805
- writer.int32(message.status[i]);
1806
- writer.join();
1807
- }
1808
- /* repeated resources.centrum.dispatches.StatusDispatch not_status = 3; */
1809
- if (message.notStatus.length) {
1810
- writer.tag(3, WireType.LengthDelimited).fork();
1811
- for (let i = 0; i < message.notStatus.length; i++)
1812
- writer.int32(message.notStatus[i]);
1813
- writer.join();
1814
- }
1815
- /* repeated int64 ids = 4; */
1816
- if (message.ids.length) {
1817
- writer.tag(4, WireType.LengthDelimited).fork();
1818
- for (let i = 0; i < message.ids.length; i++)
1819
- writer.int64(message.ids[i]);
1820
- writer.join();
1821
- }
1822
- /* optional string postal = 5; */
1823
- if (message.postal !== undefined)
1824
- writer.tag(5, WireType.LengthDelimited).string(message.postal);
1825
- let u = options.writeUnknownFields;
1826
- if (u !== false)
1827
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1828
- return writer;
1829
- }
1830
- }
1831
- /**
1832
- * @generated MessageType for protobuf message services.centrum.ListDispatchesRequest
1833
- */
1834
- export const ListDispatchesRequest = new ListDispatchesRequest$Type();
1835
- // @generated message type with reflection information, may provide speed optimized methods
1836
- class ListDispatchesResponse$Type extends MessageType<ListDispatchesResponse> {
1837
- constructor() {
1838
- super("services.centrum.ListDispatchesResponse", [
1839
- { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
1840
- { no: 2, name: "dispatches", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Dispatch, options: { "codegen.itemslen.enabled": true } }
1841
- ]);
1842
- }
1843
- create(value?: PartialMessage<ListDispatchesResponse>): ListDispatchesResponse {
1844
- const message = globalThis.Object.create((this.messagePrototype!));
1845
- message.dispatches = [];
1846
- if (value !== undefined)
1847
- reflectionMergePartial<ListDispatchesResponse>(this, message, value);
1848
- return message;
1849
- }
1850
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDispatchesResponse): ListDispatchesResponse {
1851
- let message = target ?? this.create(), end = reader.pos + length;
1852
- while (reader.pos < end) {
1853
- let [fieldNo, wireType] = reader.tag();
1854
- switch (fieldNo) {
1855
- case /* resources.common.database.PaginationResponse pagination */ 1:
1856
- message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
1857
- break;
1858
- case /* repeated resources.centrum.dispatches.Dispatch dispatches */ 2:
1859
- message.dispatches.push(Dispatch.internalBinaryRead(reader, reader.uint32(), options));
1860
- break;
1861
- default:
1862
- let u = options.readUnknownField;
1863
- if (u === "throw")
1864
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1865
- let d = reader.skip(wireType);
1866
- if (u !== false)
1867
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1868
- }
1869
- }
1870
- return message;
1871
- }
1872
- internalBinaryWrite(message: ListDispatchesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1873
- /* resources.common.database.PaginationResponse pagination = 1; */
1874
- if (message.pagination)
1875
- PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1876
- /* repeated resources.centrum.dispatches.Dispatch dispatches = 2; */
1877
- for (let i = 0; i < message.dispatches.length; i++)
1878
- Dispatch.internalBinaryWrite(message.dispatches[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
1879
- let u = options.writeUnknownFields;
1880
- if (u !== false)
1881
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1882
- return writer;
1883
- }
1884
- }
1885
- /**
1886
- * @generated MessageType for protobuf message services.centrum.ListDispatchesResponse
1887
- */
1888
- export const ListDispatchesResponse = new ListDispatchesResponse$Type();
1889
- // @generated message type with reflection information, may provide speed optimized methods
1890
- class GetDispatchRequest$Type extends MessageType<GetDispatchRequest> {
1891
- constructor() {
1892
- super("services.centrum.GetDispatchRequest", [
1893
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } }
1894
- ]);
1895
- }
1896
- create(value?: PartialMessage<GetDispatchRequest>): GetDispatchRequest {
1897
- const message = globalThis.Object.create((this.messagePrototype!));
1898
- message.id = 0;
1899
- if (value !== undefined)
1900
- reflectionMergePartial<GetDispatchRequest>(this, message, value);
1901
- return message;
1902
- }
1903
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDispatchRequest): GetDispatchRequest {
1904
- let message = target ?? this.create(), end = reader.pos + length;
1905
- while (reader.pos < end) {
1906
- let [fieldNo, wireType] = reader.tag();
1907
- switch (fieldNo) {
1908
- case /* int64 id */ 1:
1909
- message.id = reader.int64().toNumber();
1910
- break;
1911
- default:
1912
- let u = options.readUnknownField;
1913
- if (u === "throw")
1914
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1915
- let d = reader.skip(wireType);
1916
- if (u !== false)
1917
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1918
- }
1919
- }
1920
- return message;
1921
- }
1922
- internalBinaryWrite(message: GetDispatchRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1923
- /* int64 id = 1; */
1924
- if (message.id !== 0)
1925
- writer.tag(1, WireType.Varint).int64(message.id);
1926
- let u = options.writeUnknownFields;
1927
- if (u !== false)
1928
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1929
- return writer;
1930
- }
1931
- }
1932
- /**
1933
- * @generated MessageType for protobuf message services.centrum.GetDispatchRequest
1934
- */
1935
- export const GetDispatchRequest = new GetDispatchRequest$Type();
1936
- // @generated message type with reflection information, may provide speed optimized methods
1937
- class GetDispatchResponse$Type extends MessageType<GetDispatchResponse> {
1938
- constructor() {
1939
- super("services.centrum.GetDispatchResponse", [
1940
- { no: 1, name: "dispatch", kind: "message", T: () => Dispatch }
1941
- ]);
1942
- }
1943
- create(value?: PartialMessage<GetDispatchResponse>): GetDispatchResponse {
1944
- const message = globalThis.Object.create((this.messagePrototype!));
1945
- if (value !== undefined)
1946
- reflectionMergePartial<GetDispatchResponse>(this, message, value);
1947
- return message;
1948
- }
1949
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDispatchResponse): GetDispatchResponse {
1950
- let message = target ?? this.create(), end = reader.pos + length;
1951
- while (reader.pos < end) {
1952
- let [fieldNo, wireType] = reader.tag();
1953
- switch (fieldNo) {
1954
- case /* resources.centrum.dispatches.Dispatch dispatch */ 1:
1955
- message.dispatch = Dispatch.internalBinaryRead(reader, reader.uint32(), options, message.dispatch);
1956
- break;
1957
- default:
1958
- let u = options.readUnknownField;
1959
- if (u === "throw")
1960
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
1961
- let d = reader.skip(wireType);
1962
- if (u !== false)
1963
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
1964
- }
1965
- }
1966
- return message;
1967
- }
1968
- internalBinaryWrite(message: GetDispatchResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
1969
- /* resources.centrum.dispatches.Dispatch dispatch = 1; */
1970
- if (message.dispatch)
1971
- Dispatch.internalBinaryWrite(message.dispatch, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
1972
- let u = options.writeUnknownFields;
1973
- if (u !== false)
1974
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
1975
- return writer;
1976
- }
1977
- }
1978
- /**
1979
- * @generated MessageType for protobuf message services.centrum.GetDispatchResponse
1980
- */
1981
- export const GetDispatchResponse = new GetDispatchResponse$Type();
1982
- // @generated message type with reflection information, may provide speed optimized methods
1983
- class CreateDispatchRequest$Type extends MessageType<CreateDispatchRequest> {
1984
- constructor() {
1985
- super("services.centrum.CreateDispatchRequest", [
1986
- { no: 1, name: "dispatch", kind: "message", T: () => Dispatch, options: { "buf.validate.field": { required: true } } }
1987
- ]);
1988
- }
1989
- create(value?: PartialMessage<CreateDispatchRequest>): CreateDispatchRequest {
1990
- const message = globalThis.Object.create((this.messagePrototype!));
1991
- if (value !== undefined)
1992
- reflectionMergePartial<CreateDispatchRequest>(this, message, value);
1993
- return message;
1994
- }
1995
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateDispatchRequest): CreateDispatchRequest {
1996
- let message = target ?? this.create(), end = reader.pos + length;
1997
- while (reader.pos < end) {
1998
- let [fieldNo, wireType] = reader.tag();
1999
- switch (fieldNo) {
2000
- case /* resources.centrum.dispatches.Dispatch dispatch */ 1:
2001
- message.dispatch = Dispatch.internalBinaryRead(reader, reader.uint32(), options, message.dispatch);
2002
- break;
2003
- default:
2004
- let u = options.readUnknownField;
2005
- if (u === "throw")
2006
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2007
- let d = reader.skip(wireType);
2008
- if (u !== false)
2009
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2010
- }
2011
- }
2012
- return message;
2013
- }
2014
- internalBinaryWrite(message: CreateDispatchRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2015
- /* resources.centrum.dispatches.Dispatch dispatch = 1; */
2016
- if (message.dispatch)
2017
- Dispatch.internalBinaryWrite(message.dispatch, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2018
- let u = options.writeUnknownFields;
2019
- if (u !== false)
2020
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2021
- return writer;
2022
- }
2023
- }
2024
- /**
2025
- * @generated MessageType for protobuf message services.centrum.CreateDispatchRequest
2026
- */
2027
- export const CreateDispatchRequest = new CreateDispatchRequest$Type();
2028
- // @generated message type with reflection information, may provide speed optimized methods
2029
- class CreateDispatchResponse$Type extends MessageType<CreateDispatchResponse> {
2030
- constructor() {
2031
- super("services.centrum.CreateDispatchResponse", [
2032
- { no: 1, name: "dispatch", kind: "message", T: () => Dispatch }
2033
- ]);
2034
- }
2035
- create(value?: PartialMessage<CreateDispatchResponse>): CreateDispatchResponse {
2036
- const message = globalThis.Object.create((this.messagePrototype!));
2037
- if (value !== undefined)
2038
- reflectionMergePartial<CreateDispatchResponse>(this, message, value);
2039
- return message;
2040
- }
2041
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateDispatchResponse): CreateDispatchResponse {
2042
- let message = target ?? this.create(), end = reader.pos + length;
2043
- while (reader.pos < end) {
2044
- let [fieldNo, wireType] = reader.tag();
2045
- switch (fieldNo) {
2046
- case /* resources.centrum.dispatches.Dispatch dispatch */ 1:
2047
- message.dispatch = Dispatch.internalBinaryRead(reader, reader.uint32(), options, message.dispatch);
2048
- break;
2049
- default:
2050
- let u = options.readUnknownField;
2051
- if (u === "throw")
2052
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2053
- let d = reader.skip(wireType);
2054
- if (u !== false)
2055
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2056
- }
2057
- }
2058
- return message;
2059
- }
2060
- internalBinaryWrite(message: CreateDispatchResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2061
- /* resources.centrum.dispatches.Dispatch dispatch = 1; */
2062
- if (message.dispatch)
2063
- Dispatch.internalBinaryWrite(message.dispatch, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2064
- let u = options.writeUnknownFields;
2065
- if (u !== false)
2066
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2067
- return writer;
2068
- }
2069
- }
2070
- /**
2071
- * @generated MessageType for protobuf message services.centrum.CreateDispatchResponse
2072
- */
2073
- export const CreateDispatchResponse = new CreateDispatchResponse$Type();
2074
- // @generated message type with reflection information, may provide speed optimized methods
2075
- class UpdateDispatchRequest$Type extends MessageType<UpdateDispatchRequest> {
2076
- constructor() {
2077
- super("services.centrum.UpdateDispatchRequest", [
2078
- { no: 1, name: "dispatch", kind: "message", T: () => Dispatch, options: { "buf.validate.field": { required: true } } }
2079
- ]);
2080
- }
2081
- create(value?: PartialMessage<UpdateDispatchRequest>): UpdateDispatchRequest {
2082
- const message = globalThis.Object.create((this.messagePrototype!));
2083
- if (value !== undefined)
2084
- reflectionMergePartial<UpdateDispatchRequest>(this, message, value);
2085
- return message;
2086
- }
2087
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchRequest): UpdateDispatchRequest {
2088
- let message = target ?? this.create(), end = reader.pos + length;
2089
- while (reader.pos < end) {
2090
- let [fieldNo, wireType] = reader.tag();
2091
- switch (fieldNo) {
2092
- case /* resources.centrum.dispatches.Dispatch dispatch */ 1:
2093
- message.dispatch = Dispatch.internalBinaryRead(reader, reader.uint32(), options, message.dispatch);
2094
- break;
2095
- default:
2096
- let u = options.readUnknownField;
2097
- if (u === "throw")
2098
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2099
- let d = reader.skip(wireType);
2100
- if (u !== false)
2101
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2102
- }
2103
- }
2104
- return message;
2105
- }
2106
- internalBinaryWrite(message: UpdateDispatchRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2107
- /* resources.centrum.dispatches.Dispatch dispatch = 1; */
2108
- if (message.dispatch)
2109
- Dispatch.internalBinaryWrite(message.dispatch, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2110
- let u = options.writeUnknownFields;
2111
- if (u !== false)
2112
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2113
- return writer;
2114
- }
2115
- }
2116
- /**
2117
- * @generated MessageType for protobuf message services.centrum.UpdateDispatchRequest
2118
- */
2119
- export const UpdateDispatchRequest = new UpdateDispatchRequest$Type();
2120
- // @generated message type with reflection information, may provide speed optimized methods
2121
- class UpdateDispatchResponse$Type extends MessageType<UpdateDispatchResponse> {
2122
- constructor() {
2123
- super("services.centrum.UpdateDispatchResponse", [
2124
- { no: 1, name: "dispatch", kind: "message", T: () => Dispatch }
2125
- ]);
2126
- }
2127
- create(value?: PartialMessage<UpdateDispatchResponse>): UpdateDispatchResponse {
2128
- const message = globalThis.Object.create((this.messagePrototype!));
2129
- if (value !== undefined)
2130
- reflectionMergePartial<UpdateDispatchResponse>(this, message, value);
2131
- return message;
2132
- }
2133
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchResponse): UpdateDispatchResponse {
2134
- let message = target ?? this.create(), end = reader.pos + length;
2135
- while (reader.pos < end) {
2136
- let [fieldNo, wireType] = reader.tag();
2137
- switch (fieldNo) {
2138
- case /* resources.centrum.dispatches.Dispatch dispatch */ 1:
2139
- message.dispatch = Dispatch.internalBinaryRead(reader, reader.uint32(), options, message.dispatch);
2140
- break;
2141
- default:
2142
- let u = options.readUnknownField;
2143
- if (u === "throw")
2144
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2145
- let d = reader.skip(wireType);
2146
- if (u !== false)
2147
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2148
- }
2149
- }
2150
- return message;
2151
- }
2152
- internalBinaryWrite(message: UpdateDispatchResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2153
- /* resources.centrum.dispatches.Dispatch dispatch = 1; */
2154
- if (message.dispatch)
2155
- Dispatch.internalBinaryWrite(message.dispatch, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2156
- let u = options.writeUnknownFields;
2157
- if (u !== false)
2158
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2159
- return writer;
2160
- }
2161
- }
2162
- /**
2163
- * @generated MessageType for protobuf message services.centrum.UpdateDispatchResponse
2164
- */
2165
- export const UpdateDispatchResponse = new UpdateDispatchResponse$Type();
2166
- // @generated message type with reflection information, may provide speed optimized methods
2167
- class DeleteDispatchRequest$Type extends MessageType<DeleteDispatchRequest> {
2168
- constructor() {
2169
- super("services.centrum.DeleteDispatchRequest", [
2170
- { no: 1, name: "id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { int64: { gt: "0" } } } }
2171
- ]);
2172
- }
2173
- create(value?: PartialMessage<DeleteDispatchRequest>): DeleteDispatchRequest {
2174
- const message = globalThis.Object.create((this.messagePrototype!));
2175
- message.id = 0;
2176
- if (value !== undefined)
2177
- reflectionMergePartial<DeleteDispatchRequest>(this, message, value);
2178
- return message;
2179
- }
2180
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDispatchRequest): DeleteDispatchRequest {
2181
- let message = target ?? this.create(), end = reader.pos + length;
2182
- while (reader.pos < end) {
2183
- let [fieldNo, wireType] = reader.tag();
2184
- switch (fieldNo) {
2185
- case /* int64 id */ 1:
2186
- message.id = reader.int64().toNumber();
2187
- break;
2188
- default:
2189
- let u = options.readUnknownField;
2190
- if (u === "throw")
2191
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2192
- let d = reader.skip(wireType);
2193
- if (u !== false)
2194
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2195
- }
2196
- }
2197
- return message;
2198
- }
2199
- internalBinaryWrite(message: DeleteDispatchRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2200
- /* int64 id = 1; */
2201
- if (message.id !== 0)
2202
- writer.tag(1, WireType.Varint).int64(message.id);
2203
- let u = options.writeUnknownFields;
2204
- if (u !== false)
2205
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2206
- return writer;
2207
- }
2208
- }
2209
- /**
2210
- * @generated MessageType for protobuf message services.centrum.DeleteDispatchRequest
2211
- */
2212
- export const DeleteDispatchRequest = new DeleteDispatchRequest$Type();
2213
- // @generated message type with reflection information, may provide speed optimized methods
2214
- class DeleteDispatchResponse$Type extends MessageType<DeleteDispatchResponse> {
2215
- constructor() {
2216
- super("services.centrum.DeleteDispatchResponse", []);
2217
- }
2218
- create(value?: PartialMessage<DeleteDispatchResponse>): DeleteDispatchResponse {
2219
- const message = globalThis.Object.create((this.messagePrototype!));
2220
- if (value !== undefined)
2221
- reflectionMergePartial<DeleteDispatchResponse>(this, message, value);
2222
- return message;
2223
- }
2224
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteDispatchResponse): DeleteDispatchResponse {
2225
- let message = target ?? this.create(), end = reader.pos + length;
2226
- while (reader.pos < end) {
2227
- let [fieldNo, wireType] = reader.tag();
2228
- switch (fieldNo) {
2229
- default:
2230
- let u = options.readUnknownField;
2231
- if (u === "throw")
2232
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2233
- let d = reader.skip(wireType);
2234
- if (u !== false)
2235
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2236
- }
2237
- }
2238
- return message;
2239
- }
2240
- internalBinaryWrite(message: DeleteDispatchResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2241
- let u = options.writeUnknownFields;
2242
- if (u !== false)
2243
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2244
- return writer;
2245
- }
2246
- }
2247
- /**
2248
- * @generated MessageType for protobuf message services.centrum.DeleteDispatchResponse
2249
- */
2250
- export const DeleteDispatchResponse = new DeleteDispatchResponse$Type();
2251
- // @generated message type with reflection information, may provide speed optimized methods
2252
- class ListDispatchTargetJobsRequest$Type extends MessageType<ListDispatchTargetJobsRequest> {
2253
- constructor() {
2254
- super("services.centrum.ListDispatchTargetJobsRequest", []);
2255
- }
2256
- create(value?: PartialMessage<ListDispatchTargetJobsRequest>): ListDispatchTargetJobsRequest {
2257
- const message = globalThis.Object.create((this.messagePrototype!));
2258
- if (value !== undefined)
2259
- reflectionMergePartial<ListDispatchTargetJobsRequest>(this, message, value);
2260
- return message;
2261
- }
2262
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDispatchTargetJobsRequest): ListDispatchTargetJobsRequest {
2263
- let message = target ?? this.create(), end = reader.pos + length;
2264
- while (reader.pos < end) {
2265
- let [fieldNo, wireType] = reader.tag();
2266
- switch (fieldNo) {
2267
- default:
2268
- let u = options.readUnknownField;
2269
- if (u === "throw")
2270
- throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
2271
- let d = reader.skip(wireType);
2272
- if (u !== false)
2273
- (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
2274
- }
2275
- }
2276
- return message;
2277
- }
2278
- internalBinaryWrite(message: ListDispatchTargetJobsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2279
- let u = options.writeUnknownFields;
2280
- if (u !== false)
2281
- (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
2282
- return writer;
2283
- }
152
+ /**
153
+ * @generated from protobuf field: repeated resources.centrum.dispatches.Dispatch dispatches = 4
154
+ */
155
+ dispatches: Dispatch[];
156
+ }
157
+ /**
158
+ * @generated from protobuf message services.centrum.StreamRequest
159
+ */
160
+ export interface StreamRequest {
2284
161
  }
2285
162
  /**
2286
- * @generated MessageType for protobuf message services.centrum.ListDispatchTargetJobsRequest
163
+ * @generated from protobuf message services.centrum.StreamResponse
2287
164
  */
2288
- export const ListDispatchTargetJobsRequest = new ListDispatchTargetJobsRequest$Type();
165
+ export interface StreamResponse {
166
+ /**
167
+ * @generated from protobuf oneof: change
168
+ */
169
+ change: {
170
+ oneofKind: "handshake";
171
+ /**
172
+ * @generated from protobuf field: services.centrum.StreamHandshake handshake = 1
173
+ */
174
+ handshake: StreamHandshake;
175
+ } | {
176
+ oneofKind: "latestState";
177
+ /**
178
+ * @generated from protobuf field: services.centrum.LatestState latest_state = 2
179
+ */
180
+ latestState: LatestState;
181
+ } | {
182
+ oneofKind: "settings";
183
+ /**
184
+ * @generated from protobuf field: resources.centrum.settings.Settings settings = 3
185
+ */
186
+ settings: Settings;
187
+ } | {
188
+ oneofKind: "access";
189
+ /**
190
+ * @generated from protobuf field: resources.centrum.settings.EffectiveAccess access = 4
191
+ */
192
+ access: EffectiveAccess;
193
+ } | {
194
+ oneofKind: "dispatchers";
195
+ /**
196
+ * @generated from protobuf field: resources.centrum.dispatchers.Dispatchers dispatchers = 5
197
+ */
198
+ dispatchers: Dispatchers;
199
+ } | {
200
+ oneofKind: "unitDeleted";
201
+ /**
202
+ * @generated from protobuf field: int64 unit_deleted = 6
203
+ */
204
+ unitDeleted: number;
205
+ } | {
206
+ oneofKind: "unitUpdated";
207
+ /**
208
+ * @generated from protobuf field: resources.centrum.units.Unit unit_updated = 7
209
+ */
210
+ unitUpdated: Unit;
211
+ } | {
212
+ oneofKind: "unitStatus";
213
+ /**
214
+ * @generated from protobuf field: resources.centrum.units.UnitStatus unit_status = 8
215
+ */
216
+ unitStatus: UnitStatus;
217
+ } | {
218
+ oneofKind: "dispatchDeleted";
219
+ /**
220
+ * @generated from protobuf field: int64 dispatch_deleted = 9
221
+ */
222
+ dispatchDeleted: number;
223
+ } | {
224
+ oneofKind: "dispatchUpdated";
225
+ /**
226
+ * @generated from protobuf field: resources.centrum.dispatches.Dispatch dispatch_updated = 10
227
+ */
228
+ dispatchUpdated: Dispatch;
229
+ } | {
230
+ oneofKind: "dispatchStatus";
231
+ /**
232
+ * @generated from protobuf field: resources.centrum.dispatches.DispatchStatus dispatch_status = 11
233
+ */
234
+ dispatchStatus: DispatchStatus;
235
+ } | {
236
+ oneofKind: undefined;
237
+ };
238
+ }
2289
239
  // @generated message type with reflection information, may provide speed optimized methods
2290
- class ListDispatchTargetJobsResponse$Type extends MessageType<ListDispatchTargetJobsResponse> {
240
+ class GetSettingsRequest$Type extends MessageType<GetSettingsRequest> {
2291
241
  constructor() {
2292
- super("services.centrum.ListDispatchTargetJobsResponse", [
2293
- { no: 1, name: "jobs", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Job, options: { "codegen.itemslen.enabled": true } }
2294
- ]);
242
+ super("services.centrum.GetSettingsRequest", []);
2295
243
  }
2296
- create(value?: PartialMessage<ListDispatchTargetJobsResponse>): ListDispatchTargetJobsResponse {
244
+ create(value?: PartialMessage<GetSettingsRequest>): GetSettingsRequest {
2297
245
  const message = globalThis.Object.create((this.messagePrototype!));
2298
- message.jobs = [];
2299
246
  if (value !== undefined)
2300
- reflectionMergePartial<ListDispatchTargetJobsResponse>(this, message, value);
247
+ reflectionMergePartial<GetSettingsRequest>(this, message, value);
2301
248
  return message;
2302
249
  }
2303
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDispatchTargetJobsResponse): ListDispatchTargetJobsResponse {
250
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSettingsRequest): GetSettingsRequest {
2304
251
  let message = target ?? this.create(), end = reader.pos + length;
2305
252
  while (reader.pos < end) {
2306
253
  let [fieldNo, wireType] = reader.tag();
2307
254
  switch (fieldNo) {
2308
- case /* repeated resources.jobs.Job jobs */ 1:
2309
- message.jobs.push(Job.internalBinaryRead(reader, reader.uint32(), options));
2310
- break;
2311
255
  default:
2312
256
  let u = options.readUnknownField;
2313
257
  if (u === "throw")
@@ -2319,10 +263,7 @@ class ListDispatchTargetJobsResponse$Type extends MessageType<ListDispatchTarget
2319
263
  }
2320
264
  return message;
2321
265
  }
2322
- internalBinaryWrite(message: ListDispatchTargetJobsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2323
- /* repeated resources.jobs.Job jobs = 1; */
2324
- for (let i = 0; i < message.jobs.length; i++)
2325
- Job.internalBinaryWrite(message.jobs[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
266
+ internalBinaryWrite(message: GetSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2326
267
  let u = options.writeUnknownFields;
2327
268
  if (u !== false)
2328
269
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2330,43 +271,33 @@ class ListDispatchTargetJobsResponse$Type extends MessageType<ListDispatchTarget
2330
271
  }
2331
272
  }
2332
273
  /**
2333
- * @generated MessageType for protobuf message services.centrum.ListDispatchTargetJobsResponse
274
+ * @generated MessageType for protobuf message services.centrum.GetSettingsRequest
2334
275
  */
2335
- export const ListDispatchTargetJobsResponse = new ListDispatchTargetJobsResponse$Type();
276
+ export const GetSettingsRequest = new GetSettingsRequest$Type();
2336
277
  // @generated message type with reflection information, may provide speed optimized methods
2337
- class UpdateDispatchStatusRequest$Type extends MessageType<UpdateDispatchStatusRequest> {
278
+ class GetSettingsResponse$Type extends MessageType<GetSettingsResponse> {
2338
279
  constructor() {
2339
- super("services.centrum.UpdateDispatchStatusRequest", [
2340
- { no: 1, name: "dispatch_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
2341
- { no: 2, name: "status", kind: "enum", T: () => ["resources.centrum.dispatches.StatusDispatch", StatusDispatch, "STATUS_DISPATCH_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
2342
- { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } },
2343
- { no: 4, name: "code", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "24" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
280
+ super("services.centrum.GetSettingsResponse", [
281
+ { no: 1, name: "settings", kind: "message", T: () => Settings },
282
+ { no: 2, name: "effective_access", kind: "message", T: () => EffectiveAccess }
2344
283
  ]);
2345
284
  }
2346
- create(value?: PartialMessage<UpdateDispatchStatusRequest>): UpdateDispatchStatusRequest {
285
+ create(value?: PartialMessage<GetSettingsResponse>): GetSettingsResponse {
2347
286
  const message = globalThis.Object.create((this.messagePrototype!));
2348
- message.dispatchId = 0;
2349
- message.status = 0;
2350
287
  if (value !== undefined)
2351
- reflectionMergePartial<UpdateDispatchStatusRequest>(this, message, value);
288
+ reflectionMergePartial<GetSettingsResponse>(this, message, value);
2352
289
  return message;
2353
290
  }
2354
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchStatusRequest): UpdateDispatchStatusRequest {
291
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSettingsResponse): GetSettingsResponse {
2355
292
  let message = target ?? this.create(), end = reader.pos + length;
2356
293
  while (reader.pos < end) {
2357
294
  let [fieldNo, wireType] = reader.tag();
2358
295
  switch (fieldNo) {
2359
- case /* int64 dispatch_id */ 1:
2360
- message.dispatchId = reader.int64().toNumber();
2361
- break;
2362
- case /* resources.centrum.dispatches.StatusDispatch status */ 2:
2363
- message.status = reader.int32();
2364
- break;
2365
- case /* optional string reason */ 3:
2366
- message.reason = reader.string();
296
+ case /* resources.centrum.settings.Settings settings */ 1:
297
+ message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
2367
298
  break;
2368
- case /* optional string code */ 4:
2369
- message.code = reader.string();
299
+ case /* resources.centrum.settings.EffectiveAccess effective_access */ 2:
300
+ message.effectiveAccess = EffectiveAccess.internalBinaryRead(reader, reader.uint32(), options, message.effectiveAccess);
2370
301
  break;
2371
302
  default:
2372
303
  let u = options.readUnknownField;
@@ -2379,19 +310,13 @@ class UpdateDispatchStatusRequest$Type extends MessageType<UpdateDispatchStatusR
2379
310
  }
2380
311
  return message;
2381
312
  }
2382
- internalBinaryWrite(message: UpdateDispatchStatusRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2383
- /* int64 dispatch_id = 1; */
2384
- if (message.dispatchId !== 0)
2385
- writer.tag(1, WireType.Varint).int64(message.dispatchId);
2386
- /* resources.centrum.dispatches.StatusDispatch status = 2; */
2387
- if (message.status !== 0)
2388
- writer.tag(2, WireType.Varint).int32(message.status);
2389
- /* optional string reason = 3; */
2390
- if (message.reason !== undefined)
2391
- writer.tag(3, WireType.LengthDelimited).string(message.reason);
2392
- /* optional string code = 4; */
2393
- if (message.code !== undefined)
2394
- writer.tag(4, WireType.LengthDelimited).string(message.code);
313
+ internalBinaryWrite(message: GetSettingsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
314
+ /* resources.centrum.settings.Settings settings = 1; */
315
+ if (message.settings)
316
+ Settings.internalBinaryWrite(message.settings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
317
+ /* resources.centrum.settings.EffectiveAccess effective_access = 2; */
318
+ if (message.effectiveAccess)
319
+ EffectiveAccess.internalBinaryWrite(message.effectiveAccess, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2395
320
  let u = options.writeUnknownFields;
2396
321
  if (u !== false)
2397
322
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2399,25 +324,30 @@ class UpdateDispatchStatusRequest$Type extends MessageType<UpdateDispatchStatusR
2399
324
  }
2400
325
  }
2401
326
  /**
2402
- * @generated MessageType for protobuf message services.centrum.UpdateDispatchStatusRequest
327
+ * @generated MessageType for protobuf message services.centrum.GetSettingsResponse
2403
328
  */
2404
- export const UpdateDispatchStatusRequest = new UpdateDispatchStatusRequest$Type();
329
+ export const GetSettingsResponse = new GetSettingsResponse$Type();
2405
330
  // @generated message type with reflection information, may provide speed optimized methods
2406
- class UpdateDispatchStatusResponse$Type extends MessageType<UpdateDispatchStatusResponse> {
331
+ class UpdateSettingsRequest$Type extends MessageType<UpdateSettingsRequest> {
2407
332
  constructor() {
2408
- super("services.centrum.UpdateDispatchStatusResponse", []);
333
+ super("services.centrum.UpdateSettingsRequest", [
334
+ { no: 1, name: "settings", kind: "message", T: () => Settings }
335
+ ]);
2409
336
  }
2410
- create(value?: PartialMessage<UpdateDispatchStatusResponse>): UpdateDispatchStatusResponse {
337
+ create(value?: PartialMessage<UpdateSettingsRequest>): UpdateSettingsRequest {
2411
338
  const message = globalThis.Object.create((this.messagePrototype!));
2412
339
  if (value !== undefined)
2413
- reflectionMergePartial<UpdateDispatchStatusResponse>(this, message, value);
340
+ reflectionMergePartial<UpdateSettingsRequest>(this, message, value);
2414
341
  return message;
2415
342
  }
2416
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchStatusResponse): UpdateDispatchStatusResponse {
343
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSettingsRequest): UpdateSettingsRequest {
2417
344
  let message = target ?? this.create(), end = reader.pos + length;
2418
345
  while (reader.pos < end) {
2419
346
  let [fieldNo, wireType] = reader.tag();
2420
347
  switch (fieldNo) {
348
+ case /* resources.centrum.settings.Settings settings */ 1:
349
+ message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
350
+ break;
2421
351
  default:
2422
352
  let u = options.readUnknownField;
2423
353
  if (u === "throw")
@@ -2429,7 +359,10 @@ class UpdateDispatchStatusResponse$Type extends MessageType<UpdateDispatchStatus
2429
359
  }
2430
360
  return message;
2431
361
  }
2432
- internalBinaryWrite(message: UpdateDispatchStatusResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
362
+ internalBinaryWrite(message: UpdateSettingsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
363
+ /* resources.centrum.settings.Settings settings = 1; */
364
+ if (message.settings)
365
+ Settings.internalBinaryWrite(message.settings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2433
366
  let u = options.writeUnknownFields;
2434
367
  if (u !== false)
2435
368
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2437,52 +370,29 @@ class UpdateDispatchStatusResponse$Type extends MessageType<UpdateDispatchStatus
2437
370
  }
2438
371
  }
2439
372
  /**
2440
- * @generated MessageType for protobuf message services.centrum.UpdateDispatchStatusResponse
373
+ * @generated MessageType for protobuf message services.centrum.UpdateSettingsRequest
2441
374
  */
2442
- export const UpdateDispatchStatusResponse = new UpdateDispatchStatusResponse$Type();
375
+ export const UpdateSettingsRequest = new UpdateSettingsRequest$Type();
2443
376
  // @generated message type with reflection information, may provide speed optimized methods
2444
- class AssignDispatchRequest$Type extends MessageType<AssignDispatchRequest> {
377
+ class UpdateSettingsResponse$Type extends MessageType<UpdateSettingsResponse> {
2445
378
  constructor() {
2446
- super("services.centrum.AssignDispatchRequest", [
2447
- { no: 1, name: "dispatch_id", kind: "scalar", T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
2448
- { no: 2, name: "to_add", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
2449
- { no: 3, name: "to_remove", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ },
2450
- { no: 4, name: "forced", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }
379
+ super("services.centrum.UpdateSettingsResponse", [
380
+ { no: 1, name: "settings", kind: "message", T: () => Settings }
2451
381
  ]);
2452
382
  }
2453
- create(value?: PartialMessage<AssignDispatchRequest>): AssignDispatchRequest {
383
+ create(value?: PartialMessage<UpdateSettingsResponse>): UpdateSettingsResponse {
2454
384
  const message = globalThis.Object.create((this.messagePrototype!));
2455
- message.dispatchId = 0;
2456
- message.toAdd = [];
2457
- message.toRemove = [];
2458
385
  if (value !== undefined)
2459
- reflectionMergePartial<AssignDispatchRequest>(this, message, value);
386
+ reflectionMergePartial<UpdateSettingsResponse>(this, message, value);
2460
387
  return message;
2461
388
  }
2462
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssignDispatchRequest): AssignDispatchRequest {
389
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSettingsResponse): UpdateSettingsResponse {
2463
390
  let message = target ?? this.create(), end = reader.pos + length;
2464
391
  while (reader.pos < end) {
2465
392
  let [fieldNo, wireType] = reader.tag();
2466
393
  switch (fieldNo) {
2467
- case /* int64 dispatch_id */ 1:
2468
- message.dispatchId = reader.int64().toNumber();
2469
- break;
2470
- case /* repeated int64 to_add */ 2:
2471
- if (wireType === WireType.LengthDelimited)
2472
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
2473
- message.toAdd.push(reader.int64().toNumber());
2474
- else
2475
- message.toAdd.push(reader.int64().toNumber());
2476
- break;
2477
- case /* repeated int64 to_remove */ 3:
2478
- if (wireType === WireType.LengthDelimited)
2479
- for (let e = reader.int32() + reader.pos; reader.pos < e;)
2480
- message.toRemove.push(reader.int64().toNumber());
2481
- else
2482
- message.toRemove.push(reader.int64().toNumber());
2483
- break;
2484
- case /* optional bool forced */ 4:
2485
- message.forced = reader.bool();
394
+ case /* resources.centrum.settings.Settings settings */ 1:
395
+ message.settings = Settings.internalBinaryRead(reader, reader.uint32(), options, message.settings);
2486
396
  break;
2487
397
  default:
2488
398
  let u = options.readUnknownField;
@@ -2495,27 +405,10 @@ class AssignDispatchRequest$Type extends MessageType<AssignDispatchRequest> {
2495
405
  }
2496
406
  return message;
2497
407
  }
2498
- internalBinaryWrite(message: AssignDispatchRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2499
- /* int64 dispatch_id = 1; */
2500
- if (message.dispatchId !== 0)
2501
- writer.tag(1, WireType.Varint).int64(message.dispatchId);
2502
- /* repeated int64 to_add = 2; */
2503
- if (message.toAdd.length) {
2504
- writer.tag(2, WireType.LengthDelimited).fork();
2505
- for (let i = 0; i < message.toAdd.length; i++)
2506
- writer.int64(message.toAdd[i]);
2507
- writer.join();
2508
- }
2509
- /* repeated int64 to_remove = 3; */
2510
- if (message.toRemove.length) {
2511
- writer.tag(3, WireType.LengthDelimited).fork();
2512
- for (let i = 0; i < message.toRemove.length; i++)
2513
- writer.int64(message.toRemove[i]);
2514
- writer.join();
2515
- }
2516
- /* optional bool forced = 4; */
2517
- if (message.forced !== undefined)
2518
- writer.tag(4, WireType.Varint).bool(message.forced);
408
+ internalBinaryWrite(message: UpdateSettingsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
409
+ /* resources.centrum.settings.Settings settings = 1; */
410
+ if (message.settings)
411
+ Settings.internalBinaryWrite(message.settings, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2519
412
  let u = options.writeUnknownFields;
2520
413
  if (u !== false)
2521
414
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2523,21 +416,21 @@ class AssignDispatchRequest$Type extends MessageType<AssignDispatchRequest> {
2523
416
  }
2524
417
  }
2525
418
  /**
2526
- * @generated MessageType for protobuf message services.centrum.AssignDispatchRequest
419
+ * @generated MessageType for protobuf message services.centrum.UpdateSettingsResponse
2527
420
  */
2528
- export const AssignDispatchRequest = new AssignDispatchRequest$Type();
421
+ export const UpdateSettingsResponse = new UpdateSettingsResponse$Type();
2529
422
  // @generated message type with reflection information, may provide speed optimized methods
2530
- class AssignDispatchResponse$Type extends MessageType<AssignDispatchResponse> {
423
+ class GetDispatchHeatmapRequest$Type extends MessageType<GetDispatchHeatmapRequest> {
2531
424
  constructor() {
2532
- super("services.centrum.AssignDispatchResponse", []);
425
+ super("services.centrum.GetDispatchHeatmapRequest", []);
2533
426
  }
2534
- create(value?: PartialMessage<AssignDispatchResponse>): AssignDispatchResponse {
427
+ create(value?: PartialMessage<GetDispatchHeatmapRequest>): GetDispatchHeatmapRequest {
2535
428
  const message = globalThis.Object.create((this.messagePrototype!));
2536
429
  if (value !== undefined)
2537
- reflectionMergePartial<AssignDispatchResponse>(this, message, value);
430
+ reflectionMergePartial<GetDispatchHeatmapRequest>(this, message, value);
2538
431
  return message;
2539
432
  }
2540
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AssignDispatchResponse): AssignDispatchResponse {
433
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDispatchHeatmapRequest): GetDispatchHeatmapRequest {
2541
434
  let message = target ?? this.create(), end = reader.pos + length;
2542
435
  while (reader.pos < end) {
2543
436
  let [fieldNo, wireType] = reader.tag();
@@ -2553,7 +446,7 @@ class AssignDispatchResponse$Type extends MessageType<AssignDispatchResponse> {
2553
446
  }
2554
447
  return message;
2555
448
  }
2556
- internalBinaryWrite(message: AssignDispatchResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
449
+ internalBinaryWrite(message: GetDispatchHeatmapRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2557
450
  let u = options.writeUnknownFields;
2558
451
  if (u !== false)
2559
452
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2561,34 +454,35 @@ class AssignDispatchResponse$Type extends MessageType<AssignDispatchResponse> {
2561
454
  }
2562
455
  }
2563
456
  /**
2564
- * @generated MessageType for protobuf message services.centrum.AssignDispatchResponse
457
+ * @generated MessageType for protobuf message services.centrum.GetDispatchHeatmapRequest
2565
458
  */
2566
- export const AssignDispatchResponse = new AssignDispatchResponse$Type();
459
+ export const GetDispatchHeatmapRequest = new GetDispatchHeatmapRequest$Type();
2567
460
  // @generated message type with reflection information, may provide speed optimized methods
2568
- class ListDispatchActivityResponse$Type extends MessageType<ListDispatchActivityResponse> {
461
+ class GetDispatchHeatmapResponse$Type extends MessageType<GetDispatchHeatmapResponse> {
2569
462
  constructor() {
2570
- super("services.centrum.ListDispatchActivityResponse", [
2571
- { no: 1, name: "pagination", kind: "message", T: () => PaginationResponse, options: { "buf.validate.field": { required: true } } },
2572
- { no: 2, name: "activity", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => DispatchStatus, options: { "codegen.itemslen.enabled": true } }
463
+ super("services.centrum.GetDispatchHeatmapResponse", [
464
+ { no: 1, name: "max_entries", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
465
+ { no: 2, name: "entries", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => HeatmapEntry }
2573
466
  ]);
2574
467
  }
2575
- create(value?: PartialMessage<ListDispatchActivityResponse>): ListDispatchActivityResponse {
468
+ create(value?: PartialMessage<GetDispatchHeatmapResponse>): GetDispatchHeatmapResponse {
2576
469
  const message = globalThis.Object.create((this.messagePrototype!));
2577
- message.activity = [];
470
+ message.maxEntries = 0;
471
+ message.entries = [];
2578
472
  if (value !== undefined)
2579
- reflectionMergePartial<ListDispatchActivityResponse>(this, message, value);
473
+ reflectionMergePartial<GetDispatchHeatmapResponse>(this, message, value);
2580
474
  return message;
2581
475
  }
2582
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListDispatchActivityResponse): ListDispatchActivityResponse {
476
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetDispatchHeatmapResponse): GetDispatchHeatmapResponse {
2583
477
  let message = target ?? this.create(), end = reader.pos + length;
2584
478
  while (reader.pos < end) {
2585
479
  let [fieldNo, wireType] = reader.tag();
2586
480
  switch (fieldNo) {
2587
- case /* resources.common.database.PaginationResponse pagination */ 1:
2588
- message.pagination = PaginationResponse.internalBinaryRead(reader, reader.uint32(), options, message.pagination);
481
+ case /* int32 max_entries */ 1:
482
+ message.maxEntries = reader.int32();
2589
483
  break;
2590
- case /* repeated resources.centrum.dispatches.DispatchStatus activity */ 2:
2591
- message.activity.push(DispatchStatus.internalBinaryRead(reader, reader.uint32(), options));
484
+ case /* repeated resources.livemap.heatmap.HeatmapEntry entries */ 2:
485
+ message.entries.push(HeatmapEntry.internalBinaryRead(reader, reader.uint32(), options));
2592
486
  break;
2593
487
  default:
2594
488
  let u = options.readUnknownField;
@@ -2601,13 +495,13 @@ class ListDispatchActivityResponse$Type extends MessageType<ListDispatchActivity
2601
495
  }
2602
496
  return message;
2603
497
  }
2604
- internalBinaryWrite(message: ListDispatchActivityResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2605
- /* resources.common.database.PaginationResponse pagination = 1; */
2606
- if (message.pagination)
2607
- PaginationResponse.internalBinaryWrite(message.pagination, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2608
- /* repeated resources.centrum.dispatches.DispatchStatus activity = 2; */
2609
- for (let i = 0; i < message.activity.length; i++)
2610
- DispatchStatus.internalBinaryWrite(message.activity[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
498
+ internalBinaryWrite(message: GetDispatchHeatmapResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
499
+ /* int32 max_entries = 1; */
500
+ if (message.maxEntries !== 0)
501
+ writer.tag(1, WireType.Varint).int32(message.maxEntries);
502
+ /* repeated resources.livemap.heatmap.HeatmapEntry entries = 2; */
503
+ for (let i = 0; i < message.entries.length; i++)
504
+ HeatmapEntry.internalBinaryWrite(message.entries[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
2611
505
  let u = options.writeUnknownFields;
2612
506
  if (u !== false)
2613
507
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2615,29 +509,30 @@ class ListDispatchActivityResponse$Type extends MessageType<ListDispatchActivity
2615
509
  }
2616
510
  }
2617
511
  /**
2618
- * @generated MessageType for protobuf message services.centrum.ListDispatchActivityResponse
512
+ * @generated MessageType for protobuf message services.centrum.GetDispatchHeatmapResponse
2619
513
  */
2620
- export const ListDispatchActivityResponse = new ListDispatchActivityResponse$Type();
514
+ export const GetDispatchHeatmapResponse = new GetDispatchHeatmapResponse$Type();
2621
515
  // @generated message type with reflection information, may provide speed optimized methods
2622
- class JoinUnitRequest$Type extends MessageType<JoinUnitRequest> {
516
+ class TakeControlRequest$Type extends MessageType<TakeControlRequest> {
2623
517
  constructor() {
2624
- super("services.centrum.JoinUnitRequest", [
2625
- { no: 1, name: "unit_id", kind: "scalar", opt: true, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/ }
518
+ super("services.centrum.TakeControlRequest", [
519
+ { no: 1, name: "signon", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
2626
520
  ]);
2627
521
  }
2628
- create(value?: PartialMessage<JoinUnitRequest>): JoinUnitRequest {
522
+ create(value?: PartialMessage<TakeControlRequest>): TakeControlRequest {
2629
523
  const message = globalThis.Object.create((this.messagePrototype!));
524
+ message.signon = false;
2630
525
  if (value !== undefined)
2631
- reflectionMergePartial<JoinUnitRequest>(this, message, value);
526
+ reflectionMergePartial<TakeControlRequest>(this, message, value);
2632
527
  return message;
2633
528
  }
2634
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JoinUnitRequest): JoinUnitRequest {
529
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TakeControlRequest): TakeControlRequest {
2635
530
  let message = target ?? this.create(), end = reader.pos + length;
2636
531
  while (reader.pos < end) {
2637
532
  let [fieldNo, wireType] = reader.tag();
2638
533
  switch (fieldNo) {
2639
- case /* optional int64 unit_id */ 1:
2640
- message.unitId = reader.int64().toNumber();
534
+ case /* bool signon */ 1:
535
+ message.signon = reader.bool();
2641
536
  break;
2642
537
  default:
2643
538
  let u = options.readUnknownField;
@@ -2650,10 +545,10 @@ class JoinUnitRequest$Type extends MessageType<JoinUnitRequest> {
2650
545
  }
2651
546
  return message;
2652
547
  }
2653
- internalBinaryWrite(message: JoinUnitRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2654
- /* optional int64 unit_id = 1; */
2655
- if (message.unitId !== undefined)
2656
- writer.tag(1, WireType.Varint).int64(message.unitId);
548
+ internalBinaryWrite(message: TakeControlRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
549
+ /* bool signon = 1; */
550
+ if (message.signon !== false)
551
+ writer.tag(1, WireType.Varint).bool(message.signon);
2657
552
  let u = options.writeUnknownFields;
2658
553
  if (u !== false)
2659
554
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2661,30 +556,25 @@ class JoinUnitRequest$Type extends MessageType<JoinUnitRequest> {
2661
556
  }
2662
557
  }
2663
558
  /**
2664
- * @generated MessageType for protobuf message services.centrum.JoinUnitRequest
559
+ * @generated MessageType for protobuf message services.centrum.TakeControlRequest
2665
560
  */
2666
- export const JoinUnitRequest = new JoinUnitRequest$Type();
561
+ export const TakeControlRequest = new TakeControlRequest$Type();
2667
562
  // @generated message type with reflection information, may provide speed optimized methods
2668
- class JoinUnitResponse$Type extends MessageType<JoinUnitResponse> {
563
+ class TakeControlResponse$Type extends MessageType<TakeControlResponse> {
2669
564
  constructor() {
2670
- super("services.centrum.JoinUnitResponse", [
2671
- { no: 1, name: "unit", kind: "message", T: () => Unit }
2672
- ]);
565
+ super("services.centrum.TakeControlResponse", []);
2673
566
  }
2674
- create(value?: PartialMessage<JoinUnitResponse>): JoinUnitResponse {
567
+ create(value?: PartialMessage<TakeControlResponse>): TakeControlResponse {
2675
568
  const message = globalThis.Object.create((this.messagePrototype!));
2676
569
  if (value !== undefined)
2677
- reflectionMergePartial<JoinUnitResponse>(this, message, value);
570
+ reflectionMergePartial<TakeControlResponse>(this, message, value);
2678
571
  return message;
2679
572
  }
2680
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JoinUnitResponse): JoinUnitResponse {
573
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TakeControlResponse): TakeControlResponse {
2681
574
  let message = target ?? this.create(), end = reader.pos + length;
2682
575
  while (reader.pos < end) {
2683
576
  let [fieldNo, wireType] = reader.tag();
2684
577
  switch (fieldNo) {
2685
- case /* resources.centrum.units.Unit unit */ 1:
2686
- message.unit = Unit.internalBinaryRead(reader, reader.uint32(), options, message.unit);
2687
- break;
2688
578
  default:
2689
579
  let u = options.readUnknownField;
2690
580
  if (u === "throw")
@@ -2696,10 +586,7 @@ class JoinUnitResponse$Type extends MessageType<JoinUnitResponse> {
2696
586
  }
2697
587
  return message;
2698
588
  }
2699
- internalBinaryWrite(message: JoinUnitResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2700
- /* resources.centrum.units.Unit unit = 1; */
2701
- if (message.unit)
2702
- Unit.internalBinaryWrite(message.unit, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
589
+ internalBinaryWrite(message: TakeControlResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2703
590
  let u = options.writeUnknownFields;
2704
591
  if (u !== false)
2705
592
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2707,43 +594,34 @@ class JoinUnitResponse$Type extends MessageType<JoinUnitResponse> {
2707
594
  }
2708
595
  }
2709
596
  /**
2710
- * @generated MessageType for protobuf message services.centrum.JoinUnitResponse
597
+ * @generated MessageType for protobuf message services.centrum.TakeControlResponse
2711
598
  */
2712
- export const JoinUnitResponse = new JoinUnitResponse$Type();
599
+ export const TakeControlResponse = new TakeControlResponse$Type();
2713
600
  // @generated message type with reflection information, may provide speed optimized methods
2714
- class TakeDispatchRequest$Type extends MessageType<TakeDispatchRequest> {
601
+ class UpdateDispatchersRequest$Type extends MessageType<UpdateDispatchersRequest> {
2715
602
  constructor() {
2716
- super("services.centrum.TakeDispatchRequest", [
2717
- { no: 1, name: "dispatch_ids", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 3 /*ScalarType.INT64*/, L: 2 /*LongType.NUMBER*/, options: { "buf.validate.field": { repeated: { minItems: "1" } } } },
2718
- { no: 2, name: "resp", kind: "enum", T: () => ["resources.centrum.dispatches.TakeDispatchResp", TakeDispatchResp, "TAKE_DISPATCH_RESP_"], options: { "buf.validate.field": { enum: { definedOnly: true } } } },
2719
- { no: 3, name: "reason", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/, options: { "buf.validate.field": { string: { maxLen: "255" } }, "codegen.sanitizer.sanitizer": { enabled: true } } }
603
+ super("services.centrum.UpdateDispatchersRequest", [
604
+ { no: 1, name: "to_remove", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 5 /*ScalarType.INT32*/, options: { "buf.validate.field": { repeated: { maxItems: "10" } } } }
2720
605
  ]);
2721
606
  }
2722
- create(value?: PartialMessage<TakeDispatchRequest>): TakeDispatchRequest {
607
+ create(value?: PartialMessage<UpdateDispatchersRequest>): UpdateDispatchersRequest {
2723
608
  const message = globalThis.Object.create((this.messagePrototype!));
2724
- message.dispatchIds = [];
2725
- message.resp = 0;
609
+ message.toRemove = [];
2726
610
  if (value !== undefined)
2727
- reflectionMergePartial<TakeDispatchRequest>(this, message, value);
611
+ reflectionMergePartial<UpdateDispatchersRequest>(this, message, value);
2728
612
  return message;
2729
613
  }
2730
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TakeDispatchRequest): TakeDispatchRequest {
614
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchersRequest): UpdateDispatchersRequest {
2731
615
  let message = target ?? this.create(), end = reader.pos + length;
2732
616
  while (reader.pos < end) {
2733
617
  let [fieldNo, wireType] = reader.tag();
2734
618
  switch (fieldNo) {
2735
- case /* repeated int64 dispatch_ids */ 1:
619
+ case /* repeated int32 to_remove */ 1:
2736
620
  if (wireType === WireType.LengthDelimited)
2737
621
  for (let e = reader.int32() + reader.pos; reader.pos < e;)
2738
- message.dispatchIds.push(reader.int64().toNumber());
622
+ message.toRemove.push(reader.int32());
2739
623
  else
2740
- message.dispatchIds.push(reader.int64().toNumber());
2741
- break;
2742
- case /* resources.centrum.dispatches.TakeDispatchResp resp */ 2:
2743
- message.resp = reader.int32();
2744
- break;
2745
- case /* optional string reason */ 3:
2746
- message.reason = reader.string();
624
+ message.toRemove.push(reader.int32());
2747
625
  break;
2748
626
  default:
2749
627
  let u = options.readUnknownField;
@@ -2756,20 +634,14 @@ class TakeDispatchRequest$Type extends MessageType<TakeDispatchRequest> {
2756
634
  }
2757
635
  return message;
2758
636
  }
2759
- internalBinaryWrite(message: TakeDispatchRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
2760
- /* repeated int64 dispatch_ids = 1; */
2761
- if (message.dispatchIds.length) {
637
+ internalBinaryWrite(message: UpdateDispatchersRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
638
+ /* repeated int32 to_remove = 1; */
639
+ if (message.toRemove.length) {
2762
640
  writer.tag(1, WireType.LengthDelimited).fork();
2763
- for (let i = 0; i < message.dispatchIds.length; i++)
2764
- writer.int64(message.dispatchIds[i]);
641
+ for (let i = 0; i < message.toRemove.length; i++)
642
+ writer.int32(message.toRemove[i]);
2765
643
  writer.join();
2766
644
  }
2767
- /* resources.centrum.dispatches.TakeDispatchResp resp = 2; */
2768
- if (message.resp !== 0)
2769
- writer.tag(2, WireType.Varint).int32(message.resp);
2770
- /* optional string reason = 3; */
2771
- if (message.reason !== undefined)
2772
- writer.tag(3, WireType.LengthDelimited).string(message.reason);
2773
645
  let u = options.writeUnknownFields;
2774
646
  if (u !== false)
2775
647
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2777,25 +649,30 @@ class TakeDispatchRequest$Type extends MessageType<TakeDispatchRequest> {
2777
649
  }
2778
650
  }
2779
651
  /**
2780
- * @generated MessageType for protobuf message services.centrum.TakeDispatchRequest
652
+ * @generated MessageType for protobuf message services.centrum.UpdateDispatchersRequest
2781
653
  */
2782
- export const TakeDispatchRequest = new TakeDispatchRequest$Type();
654
+ export const UpdateDispatchersRequest = new UpdateDispatchersRequest$Type();
2783
655
  // @generated message type with reflection information, may provide speed optimized methods
2784
- class TakeDispatchResponse$Type extends MessageType<TakeDispatchResponse> {
656
+ class UpdateDispatchersResponse$Type extends MessageType<UpdateDispatchersResponse> {
2785
657
  constructor() {
2786
- super("services.centrum.TakeDispatchResponse", []);
658
+ super("services.centrum.UpdateDispatchersResponse", [
659
+ { no: 1, name: "dispatchers", kind: "message", T: () => Dispatchers }
660
+ ]);
2787
661
  }
2788
- create(value?: PartialMessage<TakeDispatchResponse>): TakeDispatchResponse {
662
+ create(value?: PartialMessage<UpdateDispatchersResponse>): UpdateDispatchersResponse {
2789
663
  const message = globalThis.Object.create((this.messagePrototype!));
2790
664
  if (value !== undefined)
2791
- reflectionMergePartial<TakeDispatchResponse>(this, message, value);
665
+ reflectionMergePartial<UpdateDispatchersResponse>(this, message, value);
2792
666
  return message;
2793
667
  }
2794
- internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TakeDispatchResponse): TakeDispatchResponse {
668
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateDispatchersResponse): UpdateDispatchersResponse {
2795
669
  let message = target ?? this.create(), end = reader.pos + length;
2796
670
  while (reader.pos < end) {
2797
671
  let [fieldNo, wireType] = reader.tag();
2798
672
  switch (fieldNo) {
673
+ case /* resources.centrum.dispatchers.Dispatchers dispatchers */ 1:
674
+ message.dispatchers = Dispatchers.internalBinaryRead(reader, reader.uint32(), options, message.dispatchers);
675
+ break;
2799
676
  default:
2800
677
  let u = options.readUnknownField;
2801
678
  if (u === "throw")
@@ -2807,7 +684,10 @@ class TakeDispatchResponse$Type extends MessageType<TakeDispatchResponse> {
2807
684
  }
2808
685
  return message;
2809
686
  }
2810
- internalBinaryWrite(message: TakeDispatchResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
687
+ internalBinaryWrite(message: UpdateDispatchersResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
688
+ /* resources.centrum.dispatchers.Dispatchers dispatchers = 1; */
689
+ if (message.dispatchers)
690
+ Dispatchers.internalBinaryWrite(message.dispatchers, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
2811
691
  let u = options.writeUnknownFields;
2812
692
  if (u !== false)
2813
693
  (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
@@ -2815,9 +695,9 @@ class TakeDispatchResponse$Type extends MessageType<TakeDispatchResponse> {
2815
695
  }
2816
696
  }
2817
697
  /**
2818
- * @generated MessageType for protobuf message services.centrum.TakeDispatchResponse
698
+ * @generated MessageType for protobuf message services.centrum.UpdateDispatchersResponse
2819
699
  */
2820
- export const TakeDispatchResponse = new TakeDispatchResponse$Type();
700
+ export const UpdateDispatchersResponse = new UpdateDispatchersResponse$Type();
2821
701
  // @generated message type with reflection information, may provide speed optimized methods
2822
702
  class StreamHandshake$Type extends MessageType<StreamHandshake> {
2823
703
  constructor() {
@@ -3139,27 +1019,10 @@ export const StreamResponse = new StreamResponse$Type();
3139
1019
  * @generated ServiceType for protobuf service services.centrum.CentrumService
3140
1020
  */
3141
1021
  export const CentrumService = new ServiceType("services.centrum.CentrumService", [
1022
+ { name: "GetSettings", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: GetSettingsRequest, O: GetSettingsResponse },
3142
1023
  { name: "UpdateSettings", options: { "codegen.perms.perms": { enabled: true, attrs: [{ key: "Access", type: "ATTRIBUTE_TYPE_STRING_LIST", validStringList: ["Shared", "Public"] }] } }, I: UpdateSettingsRequest, O: UpdateSettingsResponse },
3143
- { name: "CreateDispatch", options: { "codegen.perms.perms": { enabled: true } }, I: CreateDispatchRequest, O: CreateDispatchResponse },
3144
- { name: "UpdateDispatch", options: { "codegen.perms.perms": { enabled: true } }, I: UpdateDispatchRequest, O: UpdateDispatchResponse },
3145
- { name: "DeleteDispatch", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteDispatchRequest, O: DeleteDispatchResponse },
3146
- { name: "ListDispatchTargetJobs", options: { "codegen.perms.perms": { enabled: true, name: "CreateDispatch" } }, I: ListDispatchTargetJobsRequest, O: ListDispatchTargetJobsResponse },
3147
- { name: "TakeControl", options: { "codegen.perms.perms": { enabled: true } }, I: TakeControlRequest, O: TakeControlResponse },
3148
- { name: "AssignDispatch", options: { "codegen.perms.perms": { enabled: true, name: "TakeControl" } }, I: AssignDispatchRequest, O: AssignDispatchResponse },
3149
- { name: "AssignUnit", options: { "codegen.perms.perms": { enabled: true, name: "TakeControl" } }, I: AssignUnitRequest, O: AssignUnitResponse },
3150
1024
  { name: "GetDispatchHeatmap", options: { "codegen.perms.perms": { enabled: true, name: "TakeControl" } }, I: GetDispatchHeatmapRequest, O: GetDispatchHeatmapResponse },
1025
+ { name: "TakeControl", options: { "codegen.perms.perms": { enabled: true } }, I: TakeControlRequest, O: TakeControlResponse },
3151
1026
  { name: "UpdateDispatchers", options: { "codegen.perms.perms": { enabled: true } }, I: UpdateDispatchersRequest, O: UpdateDispatchersResponse },
3152
- { name: "Stream", serverStreaming: true, options: { "codegen.perms.perms": { enabled: true } }, I: StreamRequest, O: StreamResponse },
3153
- { name: "GetSettings", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: GetSettingsRequest, O: GetSettingsResponse },
3154
- { name: "JoinUnit", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: JoinUnitRequest, O: JoinUnitResponse },
3155
- { name: "ListUnits", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: ListUnitsRequest, O: ListUnitsResponse },
3156
- { name: "ListUnitActivity", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: ListUnitActivityRequest, O: ListUnitActivityResponse },
3157
- { name: "GetDispatch", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: GetDispatchRequest, O: GetDispatchResponse },
3158
- { name: "ListDispatches", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: ListDispatchesRequest, O: ListDispatchesResponse },
3159
- { name: "ListDispatchActivity", options: { "codegen.perms.perms": { enabled: true, name: "Stream" } }, I: ListDispatchActivityRequest, O: ListDispatchActivityResponse },
3160
- { name: "CreateOrUpdateUnit", options: { "codegen.perms.perms": { enabled: true } }, I: CreateOrUpdateUnitRequest, O: CreateOrUpdateUnitResponse },
3161
- { name: "DeleteUnit", options: { "codegen.perms.perms": { enabled: true } }, I: DeleteUnitRequest, O: DeleteUnitResponse },
3162
- { name: "TakeDispatch", options: { "codegen.perms.perms": { enabled: true } }, I: TakeDispatchRequest, O: TakeDispatchResponse },
3163
- { name: "UpdateUnitStatus", options: { "codegen.perms.perms": { enabled: true, name: "TakeDispatch" } }, I: UpdateUnitStatusRequest, O: UpdateUnitStatusResponse },
3164
- { name: "UpdateDispatchStatus", options: { "codegen.perms.perms": { enabled: true, name: "TakeDispatch" } }, I: UpdateDispatchStatusRequest, O: UpdateDispatchStatusResponse }
1027
+ { name: "Stream", serverStreaming: true, options: { "codegen.perms.perms": { enabled: true } }, I: StreamRequest, O: StreamResponse }
3165
1028
  ], { "codegen.perms.perms_svc": { order: 100, icon: "i-mdi-car-emergency" } });