@fatehan/tsrp 1.4.30 → 1.4.35

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 (47) hide show
  1. package/dist/api.d.ts +4 -0
  2. package/dist/api.d.ts.map +1 -1
  3. package/dist/api.js +16 -0
  4. package/dist/fatehan/activities/camera.js +11 -11
  5. package/dist/fatehan/activities/workflow.js +18 -18
  6. package/dist/fatehan/apis/client.d.ts +1 -67
  7. package/dist/fatehan/apis/client.d.ts.map +1 -1
  8. package/dist/fatehan/apis/client.js +24 -1075
  9. package/dist/fatehan/areas/area.js +7 -7
  10. package/dist/fatehan/devices/devices.d.ts +15 -0
  11. package/dist/fatehan/devices/devices.d.ts.map +1 -1
  12. package/dist/fatehan/devices/devices.js +270 -32
  13. package/dist/fatehan/devices/maintenance.js +3 -3
  14. package/dist/fatehan/financial/financial.js +11 -11
  15. package/dist/fatehan/google/error_details.d.ts +421 -0
  16. package/dist/fatehan/google/error_details.d.ts.map +1 -0
  17. package/dist/fatehan/google/error_details.js +1296 -0
  18. package/dist/fatehan/google/protobuf/any.d.ts +146 -0
  19. package/dist/fatehan/google/protobuf/any.d.ts.map +1 -0
  20. package/dist/fatehan/google/protobuf/any.js +108 -0
  21. package/dist/fatehan/google/protobuf/descriptor.js +35 -35
  22. package/dist/fatehan/google/protobuf/duration.js +2 -2
  23. package/dist/fatehan/google/protobuf/field_mask.js +2 -2
  24. package/dist/fatehan/google/protobuf/timestamp.js +2 -2
  25. package/dist/fatehan/google/status.d.ts +53 -0
  26. package/dist/fatehan/google/status.d.ts.map +1 -0
  27. package/dist/fatehan/google/status.js +100 -0
  28. package/dist/fatehan/identities/authentication.js +10 -10
  29. package/dist/fatehan/identities/identities.d.ts +6 -0
  30. package/dist/fatehan/identities/identities.d.ts.map +1 -1
  31. package/dist/fatehan/identities/identities.js +44 -13
  32. package/dist/fatehan/models/fusion.js +9 -9
  33. package/dist/fatehan/models/models.js +14 -14
  34. package/dist/fatehan/notifies/notify.js +33 -33
  35. package/dist/fatehan/packets/dataModel.js +55 -55
  36. package/dist/fatehan/packets/dataModule.js +6 -6
  37. package/dist/fatehan/packets/messages.js +9 -9
  38. package/dist/fatehan/reports/report.d.ts +3 -0
  39. package/dist/fatehan/reports/report.d.ts.map +1 -1
  40. package/dist/fatehan/reports/report.js +203 -155
  41. package/dist/fatehan/services/api.d.ts +41 -1
  42. package/dist/fatehan/services/api.d.ts.map +1 -1
  43. package/dist/fatehan/services/api.js +613 -48
  44. package/dist/fatehan/services/repositories.js +9 -9
  45. package/dist/fatehan/trips/trip.js +19 -19
  46. package/dist/fatehan/utils/buf/validate/validate.js +33 -33
  47. package/package.json +1 -1
@@ -0,0 +1,1296 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.7.0
5
+ // protoc v6.31.1
6
+ // source: google/error_details.proto
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.LocalizedMessage = exports.Help_Link = exports.Help = exports.ResourceInfo = exports.RequestInfo = exports.BadRequest_FieldViolation = exports.BadRequest = exports.PreconditionFailure_Violation = exports.PreconditionFailure = exports.QuotaFailure_Violation_QuotaDimensionsEntry = exports.QuotaFailure_Violation = exports.QuotaFailure = exports.DebugInfo = exports.RetryInfo = exports.ErrorInfo_MetadataEntry = exports.ErrorInfo = exports.protobufPackage = void 0;
12
+ /* eslint-disable */
13
+ const wire_1 = require("@bufbuild/protobuf/wire");
14
+ const long_1 = __importDefault(require("long"));
15
+ const duration_1 = require("./protobuf/duration");
16
+ exports.protobufPackage = "google.rpc";
17
+ function createBaseErrorInfo() {
18
+ return { reason: "", domain: "", metadata: {} };
19
+ }
20
+ exports.ErrorInfo = {
21
+ encode(message, writer = new wire_1.BinaryWriter()) {
22
+ if (message.reason !== "") {
23
+ writer.uint32(10).string(message.reason);
24
+ }
25
+ if (message.domain !== "") {
26
+ writer.uint32(18).string(message.domain);
27
+ }
28
+ Object.entries(message.metadata).forEach(([key, value]) => {
29
+ exports.ErrorInfo_MetadataEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
30
+ });
31
+ return writer;
32
+ },
33
+ decode(input, length) {
34
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
35
+ let end = length === undefined ? reader.len : reader.pos + length;
36
+ const message = createBaseErrorInfo();
37
+ while (reader.pos < end) {
38
+ const tag = reader.uint32();
39
+ switch (tag >>> 3) {
40
+ case 1: {
41
+ if (tag !== 10) {
42
+ break;
43
+ }
44
+ message.reason = reader.string();
45
+ continue;
46
+ }
47
+ case 2: {
48
+ if (tag !== 18) {
49
+ break;
50
+ }
51
+ message.domain = reader.string();
52
+ continue;
53
+ }
54
+ case 3: {
55
+ if (tag !== 26) {
56
+ break;
57
+ }
58
+ const entry3 = exports.ErrorInfo_MetadataEntry.decode(reader, reader.uint32());
59
+ if (entry3.value !== undefined) {
60
+ message.metadata[entry3.key] = entry3.value;
61
+ }
62
+ continue;
63
+ }
64
+ }
65
+ if ((tag & 7) === 4 || tag === 0) {
66
+ break;
67
+ }
68
+ reader.skip(tag & 7);
69
+ }
70
+ return message;
71
+ },
72
+ fromJSON(object) {
73
+ return {
74
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
75
+ domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
76
+ metadata: isObject(object.metadata)
77
+ ? Object.entries(object.metadata).reduce((acc, [key, value]) => {
78
+ acc[key] = String(value);
79
+ return acc;
80
+ }, {})
81
+ : {},
82
+ };
83
+ },
84
+ toJSON(message) {
85
+ const obj = {};
86
+ if (message.reason !== "") {
87
+ obj.reason = message.reason;
88
+ }
89
+ if (message.domain !== "") {
90
+ obj.domain = message.domain;
91
+ }
92
+ if (message.metadata) {
93
+ const entries = Object.entries(message.metadata);
94
+ if (entries.length > 0) {
95
+ obj.metadata = {};
96
+ entries.forEach(([k, v]) => {
97
+ obj.metadata[k] = v;
98
+ });
99
+ }
100
+ }
101
+ return obj;
102
+ },
103
+ create(base) {
104
+ return exports.ErrorInfo.fromPartial(base !== null && base !== void 0 ? base : {});
105
+ },
106
+ fromPartial(object) {
107
+ var _a, _b, _c;
108
+ const message = createBaseErrorInfo();
109
+ message.reason = (_a = object.reason) !== null && _a !== void 0 ? _a : "";
110
+ message.domain = (_b = object.domain) !== null && _b !== void 0 ? _b : "";
111
+ message.metadata = Object.entries((_c = object.metadata) !== null && _c !== void 0 ? _c : {}).reduce((acc, [key, value]) => {
112
+ if (value !== undefined) {
113
+ acc[key] = globalThis.String(value);
114
+ }
115
+ return acc;
116
+ }, {});
117
+ return message;
118
+ },
119
+ };
120
+ function createBaseErrorInfo_MetadataEntry() {
121
+ return { key: "", value: "" };
122
+ }
123
+ exports.ErrorInfo_MetadataEntry = {
124
+ encode(message, writer = new wire_1.BinaryWriter()) {
125
+ if (message.key !== "") {
126
+ writer.uint32(10).string(message.key);
127
+ }
128
+ if (message.value !== "") {
129
+ writer.uint32(18).string(message.value);
130
+ }
131
+ return writer;
132
+ },
133
+ decode(input, length) {
134
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
135
+ let end = length === undefined ? reader.len : reader.pos + length;
136
+ const message = createBaseErrorInfo_MetadataEntry();
137
+ while (reader.pos < end) {
138
+ const tag = reader.uint32();
139
+ switch (tag >>> 3) {
140
+ case 1: {
141
+ if (tag !== 10) {
142
+ break;
143
+ }
144
+ message.key = reader.string();
145
+ continue;
146
+ }
147
+ case 2: {
148
+ if (tag !== 18) {
149
+ break;
150
+ }
151
+ message.value = reader.string();
152
+ continue;
153
+ }
154
+ }
155
+ if ((tag & 7) === 4 || tag === 0) {
156
+ break;
157
+ }
158
+ reader.skip(tag & 7);
159
+ }
160
+ return message;
161
+ },
162
+ fromJSON(object) {
163
+ return {
164
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
165
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
166
+ };
167
+ },
168
+ toJSON(message) {
169
+ const obj = {};
170
+ if (message.key !== "") {
171
+ obj.key = message.key;
172
+ }
173
+ if (message.value !== "") {
174
+ obj.value = message.value;
175
+ }
176
+ return obj;
177
+ },
178
+ create(base) {
179
+ return exports.ErrorInfo_MetadataEntry.fromPartial(base !== null && base !== void 0 ? base : {});
180
+ },
181
+ fromPartial(object) {
182
+ var _a, _b;
183
+ const message = createBaseErrorInfo_MetadataEntry();
184
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
185
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
186
+ return message;
187
+ },
188
+ };
189
+ function createBaseRetryInfo() {
190
+ return { retryDelay: undefined };
191
+ }
192
+ exports.RetryInfo = {
193
+ encode(message, writer = new wire_1.BinaryWriter()) {
194
+ if (message.retryDelay !== undefined) {
195
+ duration_1.Duration.encode(message.retryDelay, writer.uint32(10).fork()).join();
196
+ }
197
+ return writer;
198
+ },
199
+ decode(input, length) {
200
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
201
+ let end = length === undefined ? reader.len : reader.pos + length;
202
+ const message = createBaseRetryInfo();
203
+ while (reader.pos < end) {
204
+ const tag = reader.uint32();
205
+ switch (tag >>> 3) {
206
+ case 1: {
207
+ if (tag !== 10) {
208
+ break;
209
+ }
210
+ message.retryDelay = duration_1.Duration.decode(reader, reader.uint32());
211
+ continue;
212
+ }
213
+ }
214
+ if ((tag & 7) === 4 || tag === 0) {
215
+ break;
216
+ }
217
+ reader.skip(tag & 7);
218
+ }
219
+ return message;
220
+ },
221
+ fromJSON(object) {
222
+ return { retryDelay: isSet(object.retryDelay) ? duration_1.Duration.fromJSON(object.retryDelay) : undefined };
223
+ },
224
+ toJSON(message) {
225
+ const obj = {};
226
+ if (message.retryDelay !== undefined) {
227
+ obj.retryDelay = duration_1.Duration.toJSON(message.retryDelay);
228
+ }
229
+ return obj;
230
+ },
231
+ create(base) {
232
+ return exports.RetryInfo.fromPartial(base !== null && base !== void 0 ? base : {});
233
+ },
234
+ fromPartial(object) {
235
+ const message = createBaseRetryInfo();
236
+ message.retryDelay = (object.retryDelay !== undefined && object.retryDelay !== null)
237
+ ? duration_1.Duration.fromPartial(object.retryDelay)
238
+ : undefined;
239
+ return message;
240
+ },
241
+ };
242
+ function createBaseDebugInfo() {
243
+ return { stackEntries: [], detail: "" };
244
+ }
245
+ exports.DebugInfo = {
246
+ encode(message, writer = new wire_1.BinaryWriter()) {
247
+ for (const v of message.stackEntries) {
248
+ writer.uint32(10).string(v);
249
+ }
250
+ if (message.detail !== "") {
251
+ writer.uint32(18).string(message.detail);
252
+ }
253
+ return writer;
254
+ },
255
+ decode(input, length) {
256
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
257
+ let end = length === undefined ? reader.len : reader.pos + length;
258
+ const message = createBaseDebugInfo();
259
+ while (reader.pos < end) {
260
+ const tag = reader.uint32();
261
+ switch (tag >>> 3) {
262
+ case 1: {
263
+ if (tag !== 10) {
264
+ break;
265
+ }
266
+ message.stackEntries.push(reader.string());
267
+ continue;
268
+ }
269
+ case 2: {
270
+ if (tag !== 18) {
271
+ break;
272
+ }
273
+ message.detail = reader.string();
274
+ continue;
275
+ }
276
+ }
277
+ if ((tag & 7) === 4 || tag === 0) {
278
+ break;
279
+ }
280
+ reader.skip(tag & 7);
281
+ }
282
+ return message;
283
+ },
284
+ fromJSON(object) {
285
+ return {
286
+ stackEntries: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.stackEntries)
287
+ ? object.stackEntries.map((e) => globalThis.String(e))
288
+ : [],
289
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
290
+ };
291
+ },
292
+ toJSON(message) {
293
+ var _a;
294
+ const obj = {};
295
+ if ((_a = message.stackEntries) === null || _a === void 0 ? void 0 : _a.length) {
296
+ obj.stackEntries = message.stackEntries;
297
+ }
298
+ if (message.detail !== "") {
299
+ obj.detail = message.detail;
300
+ }
301
+ return obj;
302
+ },
303
+ create(base) {
304
+ return exports.DebugInfo.fromPartial(base !== null && base !== void 0 ? base : {});
305
+ },
306
+ fromPartial(object) {
307
+ var _a, _b;
308
+ const message = createBaseDebugInfo();
309
+ message.stackEntries = ((_a = object.stackEntries) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
310
+ message.detail = (_b = object.detail) !== null && _b !== void 0 ? _b : "";
311
+ return message;
312
+ },
313
+ };
314
+ function createBaseQuotaFailure() {
315
+ return { violations: [] };
316
+ }
317
+ exports.QuotaFailure = {
318
+ encode(message, writer = new wire_1.BinaryWriter()) {
319
+ for (const v of message.violations) {
320
+ exports.QuotaFailure_Violation.encode(v, writer.uint32(10).fork()).join();
321
+ }
322
+ return writer;
323
+ },
324
+ decode(input, length) {
325
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
326
+ let end = length === undefined ? reader.len : reader.pos + length;
327
+ const message = createBaseQuotaFailure();
328
+ while (reader.pos < end) {
329
+ const tag = reader.uint32();
330
+ switch (tag >>> 3) {
331
+ case 1: {
332
+ if (tag !== 10) {
333
+ break;
334
+ }
335
+ message.violations.push(exports.QuotaFailure_Violation.decode(reader, reader.uint32()));
336
+ continue;
337
+ }
338
+ }
339
+ if ((tag & 7) === 4 || tag === 0) {
340
+ break;
341
+ }
342
+ reader.skip(tag & 7);
343
+ }
344
+ return message;
345
+ },
346
+ fromJSON(object) {
347
+ return {
348
+ violations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.violations)
349
+ ? object.violations.map((e) => exports.QuotaFailure_Violation.fromJSON(e))
350
+ : [],
351
+ };
352
+ },
353
+ toJSON(message) {
354
+ var _a;
355
+ const obj = {};
356
+ if ((_a = message.violations) === null || _a === void 0 ? void 0 : _a.length) {
357
+ obj.violations = message.violations.map((e) => exports.QuotaFailure_Violation.toJSON(e));
358
+ }
359
+ return obj;
360
+ },
361
+ create(base) {
362
+ return exports.QuotaFailure.fromPartial(base !== null && base !== void 0 ? base : {});
363
+ },
364
+ fromPartial(object) {
365
+ var _a;
366
+ const message = createBaseQuotaFailure();
367
+ message.violations = ((_a = object.violations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.QuotaFailure_Violation.fromPartial(e))) || [];
368
+ return message;
369
+ },
370
+ };
371
+ function createBaseQuotaFailure_Violation() {
372
+ return {
373
+ subject: "",
374
+ description: "",
375
+ apiService: "",
376
+ quotaMetric: "",
377
+ quotaId: "",
378
+ quotaDimensions: {},
379
+ quotaValue: long_1.default.ZERO,
380
+ futureQuotaValue: undefined,
381
+ };
382
+ }
383
+ exports.QuotaFailure_Violation = {
384
+ encode(message, writer = new wire_1.BinaryWriter()) {
385
+ if (message.subject !== "") {
386
+ writer.uint32(10).string(message.subject);
387
+ }
388
+ if (message.description !== "") {
389
+ writer.uint32(18).string(message.description);
390
+ }
391
+ if (message.apiService !== "") {
392
+ writer.uint32(26).string(message.apiService);
393
+ }
394
+ if (message.quotaMetric !== "") {
395
+ writer.uint32(34).string(message.quotaMetric);
396
+ }
397
+ if (message.quotaId !== "") {
398
+ writer.uint32(42).string(message.quotaId);
399
+ }
400
+ Object.entries(message.quotaDimensions).forEach(([key, value]) => {
401
+ exports.QuotaFailure_Violation_QuotaDimensionsEntry.encode({ key: key, value }, writer.uint32(50).fork()).join();
402
+ });
403
+ if (!message.quotaValue.equals(long_1.default.ZERO)) {
404
+ writer.uint32(56).int64(message.quotaValue.toString());
405
+ }
406
+ if (message.futureQuotaValue !== undefined) {
407
+ writer.uint32(64).int64(message.futureQuotaValue.toString());
408
+ }
409
+ return writer;
410
+ },
411
+ decode(input, length) {
412
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
413
+ let end = length === undefined ? reader.len : reader.pos + length;
414
+ const message = createBaseQuotaFailure_Violation();
415
+ while (reader.pos < end) {
416
+ const tag = reader.uint32();
417
+ switch (tag >>> 3) {
418
+ case 1: {
419
+ if (tag !== 10) {
420
+ break;
421
+ }
422
+ message.subject = reader.string();
423
+ continue;
424
+ }
425
+ case 2: {
426
+ if (tag !== 18) {
427
+ break;
428
+ }
429
+ message.description = reader.string();
430
+ continue;
431
+ }
432
+ case 3: {
433
+ if (tag !== 26) {
434
+ break;
435
+ }
436
+ message.apiService = reader.string();
437
+ continue;
438
+ }
439
+ case 4: {
440
+ if (tag !== 34) {
441
+ break;
442
+ }
443
+ message.quotaMetric = reader.string();
444
+ continue;
445
+ }
446
+ case 5: {
447
+ if (tag !== 42) {
448
+ break;
449
+ }
450
+ message.quotaId = reader.string();
451
+ continue;
452
+ }
453
+ case 6: {
454
+ if (tag !== 50) {
455
+ break;
456
+ }
457
+ const entry6 = exports.QuotaFailure_Violation_QuotaDimensionsEntry.decode(reader, reader.uint32());
458
+ if (entry6.value !== undefined) {
459
+ message.quotaDimensions[entry6.key] = entry6.value;
460
+ }
461
+ continue;
462
+ }
463
+ case 7: {
464
+ if (tag !== 56) {
465
+ break;
466
+ }
467
+ message.quotaValue = long_1.default.fromString(reader.int64().toString());
468
+ continue;
469
+ }
470
+ case 8: {
471
+ if (tag !== 64) {
472
+ break;
473
+ }
474
+ message.futureQuotaValue = long_1.default.fromString(reader.int64().toString());
475
+ continue;
476
+ }
477
+ }
478
+ if ((tag & 7) === 4 || tag === 0) {
479
+ break;
480
+ }
481
+ reader.skip(tag & 7);
482
+ }
483
+ return message;
484
+ },
485
+ fromJSON(object) {
486
+ return {
487
+ subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
488
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
489
+ apiService: isSet(object.apiService) ? globalThis.String(object.apiService) : "",
490
+ quotaMetric: isSet(object.quotaMetric) ? globalThis.String(object.quotaMetric) : "",
491
+ quotaId: isSet(object.quotaId) ? globalThis.String(object.quotaId) : "",
492
+ quotaDimensions: isObject(object.quotaDimensions)
493
+ ? Object.entries(object.quotaDimensions).reduce((acc, [key, value]) => {
494
+ acc[key] = String(value);
495
+ return acc;
496
+ }, {})
497
+ : {},
498
+ quotaValue: isSet(object.quotaValue) ? long_1.default.fromValue(object.quotaValue) : long_1.default.ZERO,
499
+ futureQuotaValue: isSet(object.futureQuotaValue) ? long_1.default.fromValue(object.futureQuotaValue) : undefined,
500
+ };
501
+ },
502
+ toJSON(message) {
503
+ const obj = {};
504
+ if (message.subject !== "") {
505
+ obj.subject = message.subject;
506
+ }
507
+ if (message.description !== "") {
508
+ obj.description = message.description;
509
+ }
510
+ if (message.apiService !== "") {
511
+ obj.apiService = message.apiService;
512
+ }
513
+ if (message.quotaMetric !== "") {
514
+ obj.quotaMetric = message.quotaMetric;
515
+ }
516
+ if (message.quotaId !== "") {
517
+ obj.quotaId = message.quotaId;
518
+ }
519
+ if (message.quotaDimensions) {
520
+ const entries = Object.entries(message.quotaDimensions);
521
+ if (entries.length > 0) {
522
+ obj.quotaDimensions = {};
523
+ entries.forEach(([k, v]) => {
524
+ obj.quotaDimensions[k] = v;
525
+ });
526
+ }
527
+ }
528
+ if (!message.quotaValue.equals(long_1.default.ZERO)) {
529
+ obj.quotaValue = (message.quotaValue || long_1.default.ZERO).toString();
530
+ }
531
+ if (message.futureQuotaValue !== undefined) {
532
+ obj.futureQuotaValue = (message.futureQuotaValue || long_1.default.ZERO).toString();
533
+ }
534
+ return obj;
535
+ },
536
+ create(base) {
537
+ return exports.QuotaFailure_Violation.fromPartial(base !== null && base !== void 0 ? base : {});
538
+ },
539
+ fromPartial(object) {
540
+ var _a, _b, _c, _d, _e, _f;
541
+ const message = createBaseQuotaFailure_Violation();
542
+ message.subject = (_a = object.subject) !== null && _a !== void 0 ? _a : "";
543
+ message.description = (_b = object.description) !== null && _b !== void 0 ? _b : "";
544
+ message.apiService = (_c = object.apiService) !== null && _c !== void 0 ? _c : "";
545
+ message.quotaMetric = (_d = object.quotaMetric) !== null && _d !== void 0 ? _d : "";
546
+ message.quotaId = (_e = object.quotaId) !== null && _e !== void 0 ? _e : "";
547
+ message.quotaDimensions = Object.entries((_f = object.quotaDimensions) !== null && _f !== void 0 ? _f : {}).reduce((acc, [key, value]) => {
548
+ if (value !== undefined) {
549
+ acc[key] = globalThis.String(value);
550
+ }
551
+ return acc;
552
+ }, {});
553
+ message.quotaValue = (object.quotaValue !== undefined && object.quotaValue !== null)
554
+ ? long_1.default.fromValue(object.quotaValue)
555
+ : long_1.default.ZERO;
556
+ message.futureQuotaValue = (object.futureQuotaValue !== undefined && object.futureQuotaValue !== null)
557
+ ? long_1.default.fromValue(object.futureQuotaValue)
558
+ : undefined;
559
+ return message;
560
+ },
561
+ };
562
+ function createBaseQuotaFailure_Violation_QuotaDimensionsEntry() {
563
+ return { key: "", value: "" };
564
+ }
565
+ exports.QuotaFailure_Violation_QuotaDimensionsEntry = {
566
+ encode(message, writer = new wire_1.BinaryWriter()) {
567
+ if (message.key !== "") {
568
+ writer.uint32(10).string(message.key);
569
+ }
570
+ if (message.value !== "") {
571
+ writer.uint32(18).string(message.value);
572
+ }
573
+ return writer;
574
+ },
575
+ decode(input, length) {
576
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
577
+ let end = length === undefined ? reader.len : reader.pos + length;
578
+ const message = createBaseQuotaFailure_Violation_QuotaDimensionsEntry();
579
+ while (reader.pos < end) {
580
+ const tag = reader.uint32();
581
+ switch (tag >>> 3) {
582
+ case 1: {
583
+ if (tag !== 10) {
584
+ break;
585
+ }
586
+ message.key = reader.string();
587
+ continue;
588
+ }
589
+ case 2: {
590
+ if (tag !== 18) {
591
+ break;
592
+ }
593
+ message.value = reader.string();
594
+ continue;
595
+ }
596
+ }
597
+ if ((tag & 7) === 4 || tag === 0) {
598
+ break;
599
+ }
600
+ reader.skip(tag & 7);
601
+ }
602
+ return message;
603
+ },
604
+ fromJSON(object) {
605
+ return {
606
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
607
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
608
+ };
609
+ },
610
+ toJSON(message) {
611
+ const obj = {};
612
+ if (message.key !== "") {
613
+ obj.key = message.key;
614
+ }
615
+ if (message.value !== "") {
616
+ obj.value = message.value;
617
+ }
618
+ return obj;
619
+ },
620
+ create(base) {
621
+ return exports.QuotaFailure_Violation_QuotaDimensionsEntry.fromPartial(base !== null && base !== void 0 ? base : {});
622
+ },
623
+ fromPartial(object) {
624
+ var _a, _b;
625
+ const message = createBaseQuotaFailure_Violation_QuotaDimensionsEntry();
626
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : "";
627
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : "";
628
+ return message;
629
+ },
630
+ };
631
+ function createBasePreconditionFailure() {
632
+ return { violations: [] };
633
+ }
634
+ exports.PreconditionFailure = {
635
+ encode(message, writer = new wire_1.BinaryWriter()) {
636
+ for (const v of message.violations) {
637
+ exports.PreconditionFailure_Violation.encode(v, writer.uint32(10).fork()).join();
638
+ }
639
+ return writer;
640
+ },
641
+ decode(input, length) {
642
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
643
+ let end = length === undefined ? reader.len : reader.pos + length;
644
+ const message = createBasePreconditionFailure();
645
+ while (reader.pos < end) {
646
+ const tag = reader.uint32();
647
+ switch (tag >>> 3) {
648
+ case 1: {
649
+ if (tag !== 10) {
650
+ break;
651
+ }
652
+ message.violations.push(exports.PreconditionFailure_Violation.decode(reader, reader.uint32()));
653
+ continue;
654
+ }
655
+ }
656
+ if ((tag & 7) === 4 || tag === 0) {
657
+ break;
658
+ }
659
+ reader.skip(tag & 7);
660
+ }
661
+ return message;
662
+ },
663
+ fromJSON(object) {
664
+ return {
665
+ violations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.violations)
666
+ ? object.violations.map((e) => exports.PreconditionFailure_Violation.fromJSON(e))
667
+ : [],
668
+ };
669
+ },
670
+ toJSON(message) {
671
+ var _a;
672
+ const obj = {};
673
+ if ((_a = message.violations) === null || _a === void 0 ? void 0 : _a.length) {
674
+ obj.violations = message.violations.map((e) => exports.PreconditionFailure_Violation.toJSON(e));
675
+ }
676
+ return obj;
677
+ },
678
+ create(base) {
679
+ return exports.PreconditionFailure.fromPartial(base !== null && base !== void 0 ? base : {});
680
+ },
681
+ fromPartial(object) {
682
+ var _a;
683
+ const message = createBasePreconditionFailure();
684
+ message.violations = ((_a = object.violations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.PreconditionFailure_Violation.fromPartial(e))) || [];
685
+ return message;
686
+ },
687
+ };
688
+ function createBasePreconditionFailure_Violation() {
689
+ return { type: "", subject: "", description: "" };
690
+ }
691
+ exports.PreconditionFailure_Violation = {
692
+ encode(message, writer = new wire_1.BinaryWriter()) {
693
+ if (message.type !== "") {
694
+ writer.uint32(10).string(message.type);
695
+ }
696
+ if (message.subject !== "") {
697
+ writer.uint32(18).string(message.subject);
698
+ }
699
+ if (message.description !== "") {
700
+ writer.uint32(26).string(message.description);
701
+ }
702
+ return writer;
703
+ },
704
+ decode(input, length) {
705
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
706
+ let end = length === undefined ? reader.len : reader.pos + length;
707
+ const message = createBasePreconditionFailure_Violation();
708
+ while (reader.pos < end) {
709
+ const tag = reader.uint32();
710
+ switch (tag >>> 3) {
711
+ case 1: {
712
+ if (tag !== 10) {
713
+ break;
714
+ }
715
+ message.type = reader.string();
716
+ continue;
717
+ }
718
+ case 2: {
719
+ if (tag !== 18) {
720
+ break;
721
+ }
722
+ message.subject = reader.string();
723
+ continue;
724
+ }
725
+ case 3: {
726
+ if (tag !== 26) {
727
+ break;
728
+ }
729
+ message.description = reader.string();
730
+ continue;
731
+ }
732
+ }
733
+ if ((tag & 7) === 4 || tag === 0) {
734
+ break;
735
+ }
736
+ reader.skip(tag & 7);
737
+ }
738
+ return message;
739
+ },
740
+ fromJSON(object) {
741
+ return {
742
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
743
+ subject: isSet(object.subject) ? globalThis.String(object.subject) : "",
744
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
745
+ };
746
+ },
747
+ toJSON(message) {
748
+ const obj = {};
749
+ if (message.type !== "") {
750
+ obj.type = message.type;
751
+ }
752
+ if (message.subject !== "") {
753
+ obj.subject = message.subject;
754
+ }
755
+ if (message.description !== "") {
756
+ obj.description = message.description;
757
+ }
758
+ return obj;
759
+ },
760
+ create(base) {
761
+ return exports.PreconditionFailure_Violation.fromPartial(base !== null && base !== void 0 ? base : {});
762
+ },
763
+ fromPartial(object) {
764
+ var _a, _b, _c;
765
+ const message = createBasePreconditionFailure_Violation();
766
+ message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
767
+ message.subject = (_b = object.subject) !== null && _b !== void 0 ? _b : "";
768
+ message.description = (_c = object.description) !== null && _c !== void 0 ? _c : "";
769
+ return message;
770
+ },
771
+ };
772
+ function createBaseBadRequest() {
773
+ return { fieldViolations: [] };
774
+ }
775
+ exports.BadRequest = {
776
+ encode(message, writer = new wire_1.BinaryWriter()) {
777
+ for (const v of message.fieldViolations) {
778
+ exports.BadRequest_FieldViolation.encode(v, writer.uint32(10).fork()).join();
779
+ }
780
+ return writer;
781
+ },
782
+ decode(input, length) {
783
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
784
+ let end = length === undefined ? reader.len : reader.pos + length;
785
+ const message = createBaseBadRequest();
786
+ while (reader.pos < end) {
787
+ const tag = reader.uint32();
788
+ switch (tag >>> 3) {
789
+ case 1: {
790
+ if (tag !== 10) {
791
+ break;
792
+ }
793
+ message.fieldViolations.push(exports.BadRequest_FieldViolation.decode(reader, reader.uint32()));
794
+ continue;
795
+ }
796
+ }
797
+ if ((tag & 7) === 4 || tag === 0) {
798
+ break;
799
+ }
800
+ reader.skip(tag & 7);
801
+ }
802
+ return message;
803
+ },
804
+ fromJSON(object) {
805
+ return {
806
+ fieldViolations: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.fieldViolations)
807
+ ? object.fieldViolations.map((e) => exports.BadRequest_FieldViolation.fromJSON(e))
808
+ : [],
809
+ };
810
+ },
811
+ toJSON(message) {
812
+ var _a;
813
+ const obj = {};
814
+ if ((_a = message.fieldViolations) === null || _a === void 0 ? void 0 : _a.length) {
815
+ obj.fieldViolations = message.fieldViolations.map((e) => exports.BadRequest_FieldViolation.toJSON(e));
816
+ }
817
+ return obj;
818
+ },
819
+ create(base) {
820
+ return exports.BadRequest.fromPartial(base !== null && base !== void 0 ? base : {});
821
+ },
822
+ fromPartial(object) {
823
+ var _a;
824
+ const message = createBaseBadRequest();
825
+ message.fieldViolations = ((_a = object.fieldViolations) === null || _a === void 0 ? void 0 : _a.map((e) => exports.BadRequest_FieldViolation.fromPartial(e))) || [];
826
+ return message;
827
+ },
828
+ };
829
+ function createBaseBadRequest_FieldViolation() {
830
+ return { field: "", description: "", reason: "", localizedMessage: undefined };
831
+ }
832
+ exports.BadRequest_FieldViolation = {
833
+ encode(message, writer = new wire_1.BinaryWriter()) {
834
+ if (message.field !== "") {
835
+ writer.uint32(10).string(message.field);
836
+ }
837
+ if (message.description !== "") {
838
+ writer.uint32(18).string(message.description);
839
+ }
840
+ if (message.reason !== "") {
841
+ writer.uint32(26).string(message.reason);
842
+ }
843
+ if (message.localizedMessage !== undefined) {
844
+ exports.LocalizedMessage.encode(message.localizedMessage, writer.uint32(34).fork()).join();
845
+ }
846
+ return writer;
847
+ },
848
+ decode(input, length) {
849
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
850
+ let end = length === undefined ? reader.len : reader.pos + length;
851
+ const message = createBaseBadRequest_FieldViolation();
852
+ while (reader.pos < end) {
853
+ const tag = reader.uint32();
854
+ switch (tag >>> 3) {
855
+ case 1: {
856
+ if (tag !== 10) {
857
+ break;
858
+ }
859
+ message.field = reader.string();
860
+ continue;
861
+ }
862
+ case 2: {
863
+ if (tag !== 18) {
864
+ break;
865
+ }
866
+ message.description = reader.string();
867
+ continue;
868
+ }
869
+ case 3: {
870
+ if (tag !== 26) {
871
+ break;
872
+ }
873
+ message.reason = reader.string();
874
+ continue;
875
+ }
876
+ case 4: {
877
+ if (tag !== 34) {
878
+ break;
879
+ }
880
+ message.localizedMessage = exports.LocalizedMessage.decode(reader, reader.uint32());
881
+ continue;
882
+ }
883
+ }
884
+ if ((tag & 7) === 4 || tag === 0) {
885
+ break;
886
+ }
887
+ reader.skip(tag & 7);
888
+ }
889
+ return message;
890
+ },
891
+ fromJSON(object) {
892
+ return {
893
+ field: isSet(object.field) ? globalThis.String(object.field) : "",
894
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
895
+ reason: isSet(object.reason) ? globalThis.String(object.reason) : "",
896
+ localizedMessage: isSet(object.localizedMessage) ? exports.LocalizedMessage.fromJSON(object.localizedMessage) : undefined,
897
+ };
898
+ },
899
+ toJSON(message) {
900
+ const obj = {};
901
+ if (message.field !== "") {
902
+ obj.field = message.field;
903
+ }
904
+ if (message.description !== "") {
905
+ obj.description = message.description;
906
+ }
907
+ if (message.reason !== "") {
908
+ obj.reason = message.reason;
909
+ }
910
+ if (message.localizedMessage !== undefined) {
911
+ obj.localizedMessage = exports.LocalizedMessage.toJSON(message.localizedMessage);
912
+ }
913
+ return obj;
914
+ },
915
+ create(base) {
916
+ return exports.BadRequest_FieldViolation.fromPartial(base !== null && base !== void 0 ? base : {});
917
+ },
918
+ fromPartial(object) {
919
+ var _a, _b, _c;
920
+ const message = createBaseBadRequest_FieldViolation();
921
+ message.field = (_a = object.field) !== null && _a !== void 0 ? _a : "";
922
+ message.description = (_b = object.description) !== null && _b !== void 0 ? _b : "";
923
+ message.reason = (_c = object.reason) !== null && _c !== void 0 ? _c : "";
924
+ message.localizedMessage = (object.localizedMessage !== undefined && object.localizedMessage !== null)
925
+ ? exports.LocalizedMessage.fromPartial(object.localizedMessage)
926
+ : undefined;
927
+ return message;
928
+ },
929
+ };
930
+ function createBaseRequestInfo() {
931
+ return { requestId: "", servingData: "" };
932
+ }
933
+ exports.RequestInfo = {
934
+ encode(message, writer = new wire_1.BinaryWriter()) {
935
+ if (message.requestId !== "") {
936
+ writer.uint32(10).string(message.requestId);
937
+ }
938
+ if (message.servingData !== "") {
939
+ writer.uint32(18).string(message.servingData);
940
+ }
941
+ return writer;
942
+ },
943
+ decode(input, length) {
944
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
945
+ let end = length === undefined ? reader.len : reader.pos + length;
946
+ const message = createBaseRequestInfo();
947
+ while (reader.pos < end) {
948
+ const tag = reader.uint32();
949
+ switch (tag >>> 3) {
950
+ case 1: {
951
+ if (tag !== 10) {
952
+ break;
953
+ }
954
+ message.requestId = reader.string();
955
+ continue;
956
+ }
957
+ case 2: {
958
+ if (tag !== 18) {
959
+ break;
960
+ }
961
+ message.servingData = reader.string();
962
+ continue;
963
+ }
964
+ }
965
+ if ((tag & 7) === 4 || tag === 0) {
966
+ break;
967
+ }
968
+ reader.skip(tag & 7);
969
+ }
970
+ return message;
971
+ },
972
+ fromJSON(object) {
973
+ return {
974
+ requestId: isSet(object.requestId) ? globalThis.String(object.requestId) : "",
975
+ servingData: isSet(object.servingData) ? globalThis.String(object.servingData) : "",
976
+ };
977
+ },
978
+ toJSON(message) {
979
+ const obj = {};
980
+ if (message.requestId !== "") {
981
+ obj.requestId = message.requestId;
982
+ }
983
+ if (message.servingData !== "") {
984
+ obj.servingData = message.servingData;
985
+ }
986
+ return obj;
987
+ },
988
+ create(base) {
989
+ return exports.RequestInfo.fromPartial(base !== null && base !== void 0 ? base : {});
990
+ },
991
+ fromPartial(object) {
992
+ var _a, _b;
993
+ const message = createBaseRequestInfo();
994
+ message.requestId = (_a = object.requestId) !== null && _a !== void 0 ? _a : "";
995
+ message.servingData = (_b = object.servingData) !== null && _b !== void 0 ? _b : "";
996
+ return message;
997
+ },
998
+ };
999
+ function createBaseResourceInfo() {
1000
+ return { resourceType: "", resourceName: "", owner: "", description: "" };
1001
+ }
1002
+ exports.ResourceInfo = {
1003
+ encode(message, writer = new wire_1.BinaryWriter()) {
1004
+ if (message.resourceType !== "") {
1005
+ writer.uint32(10).string(message.resourceType);
1006
+ }
1007
+ if (message.resourceName !== "") {
1008
+ writer.uint32(18).string(message.resourceName);
1009
+ }
1010
+ if (message.owner !== "") {
1011
+ writer.uint32(26).string(message.owner);
1012
+ }
1013
+ if (message.description !== "") {
1014
+ writer.uint32(34).string(message.description);
1015
+ }
1016
+ return writer;
1017
+ },
1018
+ decode(input, length) {
1019
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1020
+ let end = length === undefined ? reader.len : reader.pos + length;
1021
+ const message = createBaseResourceInfo();
1022
+ while (reader.pos < end) {
1023
+ const tag = reader.uint32();
1024
+ switch (tag >>> 3) {
1025
+ case 1: {
1026
+ if (tag !== 10) {
1027
+ break;
1028
+ }
1029
+ message.resourceType = reader.string();
1030
+ continue;
1031
+ }
1032
+ case 2: {
1033
+ if (tag !== 18) {
1034
+ break;
1035
+ }
1036
+ message.resourceName = reader.string();
1037
+ continue;
1038
+ }
1039
+ case 3: {
1040
+ if (tag !== 26) {
1041
+ break;
1042
+ }
1043
+ message.owner = reader.string();
1044
+ continue;
1045
+ }
1046
+ case 4: {
1047
+ if (tag !== 34) {
1048
+ break;
1049
+ }
1050
+ message.description = reader.string();
1051
+ continue;
1052
+ }
1053
+ }
1054
+ if ((tag & 7) === 4 || tag === 0) {
1055
+ break;
1056
+ }
1057
+ reader.skip(tag & 7);
1058
+ }
1059
+ return message;
1060
+ },
1061
+ fromJSON(object) {
1062
+ return {
1063
+ resourceType: isSet(object.resourceType) ? globalThis.String(object.resourceType) : "",
1064
+ resourceName: isSet(object.resourceName) ? globalThis.String(object.resourceName) : "",
1065
+ owner: isSet(object.owner) ? globalThis.String(object.owner) : "",
1066
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
1067
+ };
1068
+ },
1069
+ toJSON(message) {
1070
+ const obj = {};
1071
+ if (message.resourceType !== "") {
1072
+ obj.resourceType = message.resourceType;
1073
+ }
1074
+ if (message.resourceName !== "") {
1075
+ obj.resourceName = message.resourceName;
1076
+ }
1077
+ if (message.owner !== "") {
1078
+ obj.owner = message.owner;
1079
+ }
1080
+ if (message.description !== "") {
1081
+ obj.description = message.description;
1082
+ }
1083
+ return obj;
1084
+ },
1085
+ create(base) {
1086
+ return exports.ResourceInfo.fromPartial(base !== null && base !== void 0 ? base : {});
1087
+ },
1088
+ fromPartial(object) {
1089
+ var _a, _b, _c, _d;
1090
+ const message = createBaseResourceInfo();
1091
+ message.resourceType = (_a = object.resourceType) !== null && _a !== void 0 ? _a : "";
1092
+ message.resourceName = (_b = object.resourceName) !== null && _b !== void 0 ? _b : "";
1093
+ message.owner = (_c = object.owner) !== null && _c !== void 0 ? _c : "";
1094
+ message.description = (_d = object.description) !== null && _d !== void 0 ? _d : "";
1095
+ return message;
1096
+ },
1097
+ };
1098
+ function createBaseHelp() {
1099
+ return { links: [] };
1100
+ }
1101
+ exports.Help = {
1102
+ encode(message, writer = new wire_1.BinaryWriter()) {
1103
+ for (const v of message.links) {
1104
+ exports.Help_Link.encode(v, writer.uint32(10).fork()).join();
1105
+ }
1106
+ return writer;
1107
+ },
1108
+ decode(input, length) {
1109
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1110
+ let end = length === undefined ? reader.len : reader.pos + length;
1111
+ const message = createBaseHelp();
1112
+ while (reader.pos < end) {
1113
+ const tag = reader.uint32();
1114
+ switch (tag >>> 3) {
1115
+ case 1: {
1116
+ if (tag !== 10) {
1117
+ break;
1118
+ }
1119
+ message.links.push(exports.Help_Link.decode(reader, reader.uint32()));
1120
+ continue;
1121
+ }
1122
+ }
1123
+ if ((tag & 7) === 4 || tag === 0) {
1124
+ break;
1125
+ }
1126
+ reader.skip(tag & 7);
1127
+ }
1128
+ return message;
1129
+ },
1130
+ fromJSON(object) {
1131
+ return {
1132
+ links: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.links) ? object.links.map((e) => exports.Help_Link.fromJSON(e)) : [],
1133
+ };
1134
+ },
1135
+ toJSON(message) {
1136
+ var _a;
1137
+ const obj = {};
1138
+ if ((_a = message.links) === null || _a === void 0 ? void 0 : _a.length) {
1139
+ obj.links = message.links.map((e) => exports.Help_Link.toJSON(e));
1140
+ }
1141
+ return obj;
1142
+ },
1143
+ create(base) {
1144
+ return exports.Help.fromPartial(base !== null && base !== void 0 ? base : {});
1145
+ },
1146
+ fromPartial(object) {
1147
+ var _a;
1148
+ const message = createBaseHelp();
1149
+ message.links = ((_a = object.links) === null || _a === void 0 ? void 0 : _a.map((e) => exports.Help_Link.fromPartial(e))) || [];
1150
+ return message;
1151
+ },
1152
+ };
1153
+ function createBaseHelp_Link() {
1154
+ return { description: "", url: "" };
1155
+ }
1156
+ exports.Help_Link = {
1157
+ encode(message, writer = new wire_1.BinaryWriter()) {
1158
+ if (message.description !== "") {
1159
+ writer.uint32(10).string(message.description);
1160
+ }
1161
+ if (message.url !== "") {
1162
+ writer.uint32(18).string(message.url);
1163
+ }
1164
+ return writer;
1165
+ },
1166
+ decode(input, length) {
1167
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1168
+ let end = length === undefined ? reader.len : reader.pos + length;
1169
+ const message = createBaseHelp_Link();
1170
+ while (reader.pos < end) {
1171
+ const tag = reader.uint32();
1172
+ switch (tag >>> 3) {
1173
+ case 1: {
1174
+ if (tag !== 10) {
1175
+ break;
1176
+ }
1177
+ message.description = reader.string();
1178
+ continue;
1179
+ }
1180
+ case 2: {
1181
+ if (tag !== 18) {
1182
+ break;
1183
+ }
1184
+ message.url = reader.string();
1185
+ continue;
1186
+ }
1187
+ }
1188
+ if ((tag & 7) === 4 || tag === 0) {
1189
+ break;
1190
+ }
1191
+ reader.skip(tag & 7);
1192
+ }
1193
+ return message;
1194
+ },
1195
+ fromJSON(object) {
1196
+ return {
1197
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
1198
+ url: isSet(object.url) ? globalThis.String(object.url) : "",
1199
+ };
1200
+ },
1201
+ toJSON(message) {
1202
+ const obj = {};
1203
+ if (message.description !== "") {
1204
+ obj.description = message.description;
1205
+ }
1206
+ if (message.url !== "") {
1207
+ obj.url = message.url;
1208
+ }
1209
+ return obj;
1210
+ },
1211
+ create(base) {
1212
+ return exports.Help_Link.fromPartial(base !== null && base !== void 0 ? base : {});
1213
+ },
1214
+ fromPartial(object) {
1215
+ var _a, _b;
1216
+ const message = createBaseHelp_Link();
1217
+ message.description = (_a = object.description) !== null && _a !== void 0 ? _a : "";
1218
+ message.url = (_b = object.url) !== null && _b !== void 0 ? _b : "";
1219
+ return message;
1220
+ },
1221
+ };
1222
+ function createBaseLocalizedMessage() {
1223
+ return { locale: "", message: "" };
1224
+ }
1225
+ exports.LocalizedMessage = {
1226
+ encode(message, writer = new wire_1.BinaryWriter()) {
1227
+ if (message.locale !== "") {
1228
+ writer.uint32(10).string(message.locale);
1229
+ }
1230
+ if (message.message !== "") {
1231
+ writer.uint32(18).string(message.message);
1232
+ }
1233
+ return writer;
1234
+ },
1235
+ decode(input, length) {
1236
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1237
+ let end = length === undefined ? reader.len : reader.pos + length;
1238
+ const message = createBaseLocalizedMessage();
1239
+ while (reader.pos < end) {
1240
+ const tag = reader.uint32();
1241
+ switch (tag >>> 3) {
1242
+ case 1: {
1243
+ if (tag !== 10) {
1244
+ break;
1245
+ }
1246
+ message.locale = reader.string();
1247
+ continue;
1248
+ }
1249
+ case 2: {
1250
+ if (tag !== 18) {
1251
+ break;
1252
+ }
1253
+ message.message = reader.string();
1254
+ continue;
1255
+ }
1256
+ }
1257
+ if ((tag & 7) === 4 || tag === 0) {
1258
+ break;
1259
+ }
1260
+ reader.skip(tag & 7);
1261
+ }
1262
+ return message;
1263
+ },
1264
+ fromJSON(object) {
1265
+ return {
1266
+ locale: isSet(object.locale) ? globalThis.String(object.locale) : "",
1267
+ message: isSet(object.message) ? globalThis.String(object.message) : "",
1268
+ };
1269
+ },
1270
+ toJSON(message) {
1271
+ const obj = {};
1272
+ if (message.locale !== "") {
1273
+ obj.locale = message.locale;
1274
+ }
1275
+ if (message.message !== "") {
1276
+ obj.message = message.message;
1277
+ }
1278
+ return obj;
1279
+ },
1280
+ create(base) {
1281
+ return exports.LocalizedMessage.fromPartial(base !== null && base !== void 0 ? base : {});
1282
+ },
1283
+ fromPartial(object) {
1284
+ var _a, _b;
1285
+ const message = createBaseLocalizedMessage();
1286
+ message.locale = (_a = object.locale) !== null && _a !== void 0 ? _a : "";
1287
+ message.message = (_b = object.message) !== null && _b !== void 0 ? _b : "";
1288
+ return message;
1289
+ },
1290
+ };
1291
+ function isObject(value) {
1292
+ return typeof value === "object" && value !== null;
1293
+ }
1294
+ function isSet(value) {
1295
+ return value !== null && value !== undefined;
1296
+ }