@tarkahq/sdk 0.0.0-stage → 0.3.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 (130) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +69 -0
  3. package/README.md +700 -2
  4. package/api-source.json +38 -0
  5. package/dist/cjs/client.d.ts +114 -0
  6. package/dist/cjs/client.js +174 -0
  7. package/dist/cjs/errors.d.ts +27 -0
  8. package/dist/cjs/errors.js +78 -0
  9. package/dist/cjs/generated/google/api/annotations.d.ts +1 -0
  10. package/dist/cjs/generated/google/api/annotations.js +10 -0
  11. package/dist/cjs/generated/google/api/http.d.ts +395 -0
  12. package/dist/cjs/generated/google/api/http.js +421 -0
  13. package/dist/cjs/generated/google/protobuf/descriptor.d.ts +873 -0
  14. package/dist/cjs/generated/google/protobuf/descriptor.js +3992 -0
  15. package/dist/cjs/generated/google/protobuf/empty.d.ts +35 -0
  16. package/dist/cjs/generated/google/protobuf/empty.js +58 -0
  17. package/dist/cjs/generated/google/protobuf/struct.d.ts +127 -0
  18. package/dist/cjs/generated/google/protobuf/struct.js +529 -0
  19. package/dist/cjs/generated/google/protobuf/timestamp.d.ts +128 -0
  20. package/dist/cjs/generated/google/protobuf/timestamp.js +95 -0
  21. package/dist/cjs/generated/protoc-gen-openapiv2/options/annotations.d.ts +1 -0
  22. package/dist/cjs/generated/protoc-gen-openapiv2/options/annotations.js +10 -0
  23. package/dist/cjs/generated/protoc-gen-openapiv2/options/openapiv2.d.ts +983 -0
  24. package/dist/cjs/generated/protoc-gen-openapiv2/options/openapiv2.js +4874 -0
  25. package/dist/cjs/generated/tarka/access/v1/access.d.ts +322 -0
  26. package/dist/cjs/generated/tarka/access/v1/access.js +2979 -0
  27. package/dist/cjs/generated/tarka/channels/v1/channels.d.ts +370 -0
  28. package/dist/cjs/generated/tarka/channels/v1/channels.js +3603 -0
  29. package/dist/cjs/generated/tarka/gateway/v1/gateway.d.ts +804 -0
  30. package/dist/cjs/generated/tarka/gateway/v1/gateway.js +8081 -0
  31. package/dist/cjs/generated/tarka/iam/v1/iam.d.ts +1291 -0
  32. package/dist/cjs/generated/tarka/iam/v1/iam.js +13207 -0
  33. package/dist/cjs/generated/tarka/inference/v1/inference.d.ts +699 -0
  34. package/dist/cjs/generated/tarka/inference/v1/inference.js +7058 -0
  35. package/dist/cjs/generated/tarka/provisioning/v1/agent_secrets.d.ts +70 -0
  36. package/dist/cjs/generated/tarka/provisioning/v1/agent_secrets.js +603 -0
  37. package/dist/cjs/generated/tarka/provisioning/v1/billing_quote.d.ts +171 -0
  38. package/dist/cjs/generated/tarka/provisioning/v1/billing_quote.js +1588 -0
  39. package/dist/cjs/generated/tarka/provisioning/v1/job.d.ts +168 -0
  40. package/dist/cjs/generated/tarka/provisioning/v1/job.js +1505 -0
  41. package/dist/cjs/generated/tarka/provisioning/v1/provisioning.d.ts +2644 -0
  42. package/dist/cjs/generated/tarka/provisioning/v1/provisioning.js +19501 -0
  43. package/dist/cjs/generated/tarka/provisioning/v1/registry_credentials.d.ts +89 -0
  44. package/dist/cjs/generated/tarka/provisioning/v1/registry_credentials.js +856 -0
  45. package/dist/cjs/generated/tarka/provisioning/v1/sandbox.d.ts +431 -0
  46. package/dist/cjs/generated/tarka/provisioning/v1/sandbox.js +3203 -0
  47. package/dist/cjs/generated/tarka/provisioning/v1/source_builds.d.ts +291 -0
  48. package/dist/cjs/generated/tarka/provisioning/v1/source_builds.js +3920 -0
  49. package/dist/cjs/grpc.d.ts +12 -0
  50. package/dist/cjs/grpc.js +55 -0
  51. package/dist/cjs/index.d.ts +6 -0
  52. package/dist/cjs/index.js +21 -0
  53. package/dist/cjs/package.json +1 -0
  54. package/dist/cjs/resources/inference.d.ts +293 -0
  55. package/dist/cjs/resources/inference.js +451 -0
  56. package/dist/cjs/resources/provisioning.d.ts +389 -0
  57. package/dist/cjs/resources/provisioning.js +552 -0
  58. package/dist/cjs/resources/sandboxes.d.ts +360 -0
  59. package/dist/cjs/resources/sandboxes.js +732 -0
  60. package/dist/cjs/rpc-types.d.ts +36 -0
  61. package/dist/cjs/rpc-types.js +29 -0
  62. package/dist/cjs/runtime.d.ts +99 -0
  63. package/dist/cjs/runtime.js +473 -0
  64. package/dist/cjs/transport.d.ts +60 -0
  65. package/dist/cjs/transport.js +114 -0
  66. package/dist/cjs/types.d.ts +309 -0
  67. package/dist/cjs/types.js +2 -0
  68. package/dist/esm/client.d.ts +114 -0
  69. package/dist/esm/client.js +169 -0
  70. package/dist/esm/errors.d.ts +27 -0
  71. package/dist/esm/errors.js +71 -0
  72. package/dist/esm/generated/google/api/annotations.d.ts +1 -0
  73. package/dist/esm/generated/google/api/annotations.js +7 -0
  74. package/dist/esm/generated/google/api/http.d.ts +395 -0
  75. package/dist/esm/generated/google/api/http.js +418 -0
  76. package/dist/esm/generated/google/protobuf/descriptor.d.ts +873 -0
  77. package/dist/esm/generated/google/protobuf/descriptor.js +3977 -0
  78. package/dist/esm/generated/google/protobuf/empty.d.ts +35 -0
  79. package/dist/esm/generated/google/protobuf/empty.js +55 -0
  80. package/dist/esm/generated/google/protobuf/struct.d.ts +127 -0
  81. package/dist/esm/generated/google/protobuf/struct.js +524 -0
  82. package/dist/esm/generated/google/protobuf/timestamp.d.ts +128 -0
  83. package/dist/esm/generated/google/protobuf/timestamp.js +92 -0
  84. package/dist/esm/generated/protoc-gen-openapiv2/options/annotations.d.ts +1 -0
  85. package/dist/esm/generated/protoc-gen-openapiv2/options/annotations.js +7 -0
  86. package/dist/esm/generated/protoc-gen-openapiv2/options/openapiv2.d.ts +983 -0
  87. package/dist/esm/generated/protoc-gen-openapiv2/options/openapiv2.js +4859 -0
  88. package/dist/esm/generated/tarka/access/v1/access.d.ts +322 -0
  89. package/dist/esm/generated/tarka/access/v1/access.js +2976 -0
  90. package/dist/esm/generated/tarka/channels/v1/channels.d.ts +370 -0
  91. package/dist/esm/generated/tarka/channels/v1/channels.js +3600 -0
  92. package/dist/esm/generated/tarka/gateway/v1/gateway.d.ts +804 -0
  93. package/dist/esm/generated/tarka/gateway/v1/gateway.js +8077 -0
  94. package/dist/esm/generated/tarka/iam/v1/iam.d.ts +1291 -0
  95. package/dist/esm/generated/tarka/iam/v1/iam.js +13203 -0
  96. package/dist/esm/generated/tarka/inference/v1/inference.d.ts +699 -0
  97. package/dist/esm/generated/tarka/inference/v1/inference.js +7055 -0
  98. package/dist/esm/generated/tarka/provisioning/v1/agent_secrets.d.ts +70 -0
  99. package/dist/esm/generated/tarka/provisioning/v1/agent_secrets.js +600 -0
  100. package/dist/esm/generated/tarka/provisioning/v1/billing_quote.d.ts +171 -0
  101. package/dist/esm/generated/tarka/provisioning/v1/billing_quote.js +1585 -0
  102. package/dist/esm/generated/tarka/provisioning/v1/job.d.ts +168 -0
  103. package/dist/esm/generated/tarka/provisioning/v1/job.js +1500 -0
  104. package/dist/esm/generated/tarka/provisioning/v1/provisioning.d.ts +2644 -0
  105. package/dist/esm/generated/tarka/provisioning/v1/provisioning.js +19496 -0
  106. package/dist/esm/generated/tarka/provisioning/v1/registry_credentials.d.ts +89 -0
  107. package/dist/esm/generated/tarka/provisioning/v1/registry_credentials.js +853 -0
  108. package/dist/esm/generated/tarka/provisioning/v1/sandbox.d.ts +431 -0
  109. package/dist/esm/generated/tarka/provisioning/v1/sandbox.js +3192 -0
  110. package/dist/esm/generated/tarka/provisioning/v1/source_builds.d.ts +291 -0
  111. package/dist/esm/generated/tarka/provisioning/v1/source_builds.js +3917 -0
  112. package/dist/esm/grpc.d.ts +12 -0
  113. package/dist/esm/grpc.js +11 -0
  114. package/dist/esm/index.d.ts +6 -0
  115. package/dist/esm/index.js +4 -0
  116. package/dist/esm/resources/inference.d.ts +293 -0
  117. package/dist/esm/resources/inference.js +437 -0
  118. package/dist/esm/resources/provisioning.d.ts +389 -0
  119. package/dist/esm/resources/provisioning.js +531 -0
  120. package/dist/esm/resources/sandboxes.d.ts +360 -0
  121. package/dist/esm/resources/sandboxes.js +718 -0
  122. package/dist/esm/rpc-types.d.ts +36 -0
  123. package/dist/esm/rpc-types.js +26 -0
  124. package/dist/esm/runtime.d.ts +99 -0
  125. package/dist/esm/runtime.js +466 -0
  126. package/dist/esm/transport.d.ts +60 -0
  127. package/dist/esm/transport.js +110 -0
  128. package/dist/esm/types.d.ts +309 -0
  129. package/dist/esm/types.js +1 -0
  130. package/package.json +155 -4
@@ -0,0 +1,2976 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.12.4
4
+ // protoc v3.19.1
5
+ // source: tarka/access/v1/access.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { Empty } from "../../../google/protobuf/empty.js";
9
+ import { Timestamp } from "../../../google/protobuf/timestamp.js";
10
+ import { Permission } from "../../iam/v1/iam.js";
11
+ export const protobufPackage = "tarka.access.v1";
12
+ function createBaseApplication() {
13
+ return {
14
+ id: "",
15
+ orgId: "",
16
+ realmId: "",
17
+ status: "",
18
+ version: 0n,
19
+ createdAt: undefined,
20
+ updatedAt: undefined,
21
+ name: "",
22
+ hostname: "",
23
+ agentHostId: "",
24
+ adapter: "",
25
+ operatorIds: [],
26
+ protectionState: "",
27
+ workspace: undefined,
28
+ };
29
+ }
30
+ export const Application = {
31
+ encode(message, writer = new BinaryWriter()) {
32
+ if (message.id !== "") {
33
+ writer.uint32(10).string(message.id);
34
+ }
35
+ if (message.orgId !== "") {
36
+ writer.uint32(18).string(message.orgId);
37
+ }
38
+ if (message.realmId !== "") {
39
+ writer.uint32(26).string(message.realmId);
40
+ }
41
+ if (message.status !== "") {
42
+ writer.uint32(34).string(message.status);
43
+ }
44
+ if (message.version !== 0n) {
45
+ if (BigInt.asIntN(64, message.version) !== message.version) {
46
+ throw new globalThis.Error("value provided for field message.version of type int64 too large");
47
+ }
48
+ writer.uint32(40).int64(message.version);
49
+ }
50
+ if (message.createdAt !== undefined) {
51
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(50).fork()).join();
52
+ }
53
+ if (message.updatedAt !== undefined) {
54
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(58).fork()).join();
55
+ }
56
+ if (message.name !== "") {
57
+ writer.uint32(82).string(message.name);
58
+ }
59
+ if (message.hostname !== "") {
60
+ writer.uint32(90).string(message.hostname);
61
+ }
62
+ if (message.agentHostId !== "") {
63
+ writer.uint32(98).string(message.agentHostId);
64
+ }
65
+ if (message.adapter !== "") {
66
+ writer.uint32(106).string(message.adapter);
67
+ }
68
+ for (const v of message.operatorIds) {
69
+ writer.uint32(114).string(v);
70
+ }
71
+ if (message.protectionState !== "") {
72
+ writer.uint32(122).string(message.protectionState);
73
+ }
74
+ if (message.workspace !== undefined) {
75
+ WorkspacePolicy.encode(message.workspace, writer.uint32(130).fork()).join();
76
+ }
77
+ return writer;
78
+ },
79
+ decode(input, length) {
80
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
81
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
82
+ if (previousRecursionDepth >= 100) {
83
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
84
+ }
85
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
86
+ try {
87
+ const end = length === undefined ? reader.len : reader.pos + length;
88
+ const message = createBaseApplication();
89
+ while (reader.pos < end) {
90
+ const tag = reader.uint32();
91
+ switch (tag >>> 3) {
92
+ case 1: {
93
+ if (tag !== 10) {
94
+ break;
95
+ }
96
+ message.id = reader.string();
97
+ continue;
98
+ }
99
+ case 2: {
100
+ if (tag !== 18) {
101
+ break;
102
+ }
103
+ message.orgId = reader.string();
104
+ continue;
105
+ }
106
+ case 3: {
107
+ if (tag !== 26) {
108
+ break;
109
+ }
110
+ message.realmId = reader.string();
111
+ continue;
112
+ }
113
+ case 4: {
114
+ if (tag !== 34) {
115
+ break;
116
+ }
117
+ message.status = reader.string();
118
+ continue;
119
+ }
120
+ case 5: {
121
+ if (tag !== 40) {
122
+ break;
123
+ }
124
+ message.version = reader.int64();
125
+ continue;
126
+ }
127
+ case 6: {
128
+ if (tag !== 50) {
129
+ break;
130
+ }
131
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
132
+ continue;
133
+ }
134
+ case 7: {
135
+ if (tag !== 58) {
136
+ break;
137
+ }
138
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
139
+ continue;
140
+ }
141
+ case 10: {
142
+ if (tag !== 82) {
143
+ break;
144
+ }
145
+ message.name = reader.string();
146
+ continue;
147
+ }
148
+ case 11: {
149
+ if (tag !== 90) {
150
+ break;
151
+ }
152
+ message.hostname = reader.string();
153
+ continue;
154
+ }
155
+ case 12: {
156
+ if (tag !== 98) {
157
+ break;
158
+ }
159
+ message.agentHostId = reader.string();
160
+ continue;
161
+ }
162
+ case 13: {
163
+ if (tag !== 106) {
164
+ break;
165
+ }
166
+ message.adapter = reader.string();
167
+ continue;
168
+ }
169
+ case 14: {
170
+ if (tag !== 114) {
171
+ break;
172
+ }
173
+ message.operatorIds.push(reader.string());
174
+ continue;
175
+ }
176
+ case 15: {
177
+ if (tag !== 122) {
178
+ break;
179
+ }
180
+ message.protectionState = reader.string();
181
+ continue;
182
+ }
183
+ case 16: {
184
+ if (tag !== 130) {
185
+ break;
186
+ }
187
+ message.workspace = WorkspacePolicy.decode(reader, reader.uint32());
188
+ continue;
189
+ }
190
+ }
191
+ if ((tag & 7) === 4 || tag === 0) {
192
+ break;
193
+ }
194
+ reader.skip(tag & 7);
195
+ }
196
+ return message;
197
+ }
198
+ finally {
199
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
200
+ }
201
+ },
202
+ fromJSON(object) {
203
+ return {
204
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
205
+ orgId: isSet(object.orgId)
206
+ ? globalThis.String(object.orgId)
207
+ : isSet(object.org_id)
208
+ ? globalThis.String(object.org_id)
209
+ : "",
210
+ realmId: isSet(object.realmId)
211
+ ? globalThis.String(object.realmId)
212
+ : isSet(object.realm_id)
213
+ ? globalThis.String(object.realm_id)
214
+ : "",
215
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
216
+ version: isSet(object.version) ? BigInt(object.version) : 0n,
217
+ createdAt: isSet(object.createdAt)
218
+ ? fromJsonTimestamp(object.createdAt)
219
+ : isSet(object.created_at)
220
+ ? fromJsonTimestamp(object.created_at)
221
+ : undefined,
222
+ updatedAt: isSet(object.updatedAt)
223
+ ? fromJsonTimestamp(object.updatedAt)
224
+ : isSet(object.updated_at)
225
+ ? fromJsonTimestamp(object.updated_at)
226
+ : undefined,
227
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
228
+ hostname: isSet(object.hostname) ? globalThis.String(object.hostname) : "",
229
+ agentHostId: isSet(object.agentHostId)
230
+ ? globalThis.String(object.agentHostId)
231
+ : isSet(object.agent_host_id)
232
+ ? globalThis.String(object.agent_host_id)
233
+ : "",
234
+ adapter: isSet(object.adapter) ? globalThis.String(object.adapter) : "",
235
+ operatorIds: globalThis.Array.isArray(object?.operatorIds)
236
+ ? object.operatorIds.map((e) => globalThis.String(e))
237
+ : globalThis.Array.isArray(object?.operator_ids)
238
+ ? object.operator_ids.map((e) => globalThis.String(e))
239
+ : [],
240
+ protectionState: isSet(object.protectionState)
241
+ ? globalThis.String(object.protectionState)
242
+ : isSet(object.protection_state)
243
+ ? globalThis.String(object.protection_state)
244
+ : "",
245
+ workspace: isSet(object.workspace) ? WorkspacePolicy.fromJSON(object.workspace) : undefined,
246
+ };
247
+ },
248
+ toJSON(message) {
249
+ const obj = {};
250
+ if (message.id !== "") {
251
+ obj.id = message.id;
252
+ }
253
+ if (message.orgId !== "") {
254
+ obj.orgId = message.orgId;
255
+ }
256
+ if (message.realmId !== "") {
257
+ obj.realmId = message.realmId;
258
+ }
259
+ if (message.status !== "") {
260
+ obj.status = message.status;
261
+ }
262
+ if (message.version !== 0n) {
263
+ obj.version = message.version.toString();
264
+ }
265
+ if (message.createdAt !== undefined) {
266
+ obj.createdAt = message.createdAt.toISOString();
267
+ }
268
+ if (message.updatedAt !== undefined) {
269
+ obj.updatedAt = message.updatedAt.toISOString();
270
+ }
271
+ if (message.name !== "") {
272
+ obj.name = message.name;
273
+ }
274
+ if (message.hostname !== "") {
275
+ obj.hostname = message.hostname;
276
+ }
277
+ if (message.agentHostId !== "") {
278
+ obj.agentHostId = message.agentHostId;
279
+ }
280
+ if (message.adapter !== "") {
281
+ obj.adapter = message.adapter;
282
+ }
283
+ if (message.operatorIds?.length) {
284
+ obj.operatorIds = message.operatorIds;
285
+ }
286
+ if (message.protectionState !== "") {
287
+ obj.protectionState = message.protectionState;
288
+ }
289
+ if (message.workspace !== undefined) {
290
+ obj.workspace = WorkspacePolicy.toJSON(message.workspace);
291
+ }
292
+ return obj;
293
+ },
294
+ create(base) {
295
+ return Application.fromPartial(base ?? {});
296
+ },
297
+ fromPartial(object) {
298
+ const message = createBaseApplication();
299
+ message.id = object.id ?? "";
300
+ message.orgId = object.orgId ?? "";
301
+ message.realmId = object.realmId ?? "";
302
+ message.status = object.status ?? "";
303
+ message.version = (object.version !== undefined && object.version !== null) ? BigInt(object.version) : 0n;
304
+ message.createdAt = object.createdAt ?? undefined;
305
+ message.updatedAt = object.updatedAt ?? undefined;
306
+ message.name = object.name ?? "";
307
+ message.hostname = object.hostname ?? "";
308
+ message.agentHostId = object.agentHostId ?? "";
309
+ message.adapter = object.adapter ?? "";
310
+ message.operatorIds = object.operatorIds?.map((e) => e) || [];
311
+ message.protectionState = object.protectionState ?? "";
312
+ message.workspace = (object.workspace !== undefined && object.workspace !== null)
313
+ ? WorkspacePolicy.fromPartial(object.workspace)
314
+ : undefined;
315
+ return message;
316
+ },
317
+ };
318
+ function createBaseWorkspacePolicy() {
319
+ return {
320
+ enabled: false,
321
+ agentId: "",
322
+ gatewayId: "",
323
+ transport: "",
324
+ permissions: [],
325
+ maxWorkspaces: 0,
326
+ idleTimeoutSeconds: 0,
327
+ };
328
+ }
329
+ export const WorkspacePolicy = {
330
+ encode(message, writer = new BinaryWriter()) {
331
+ if (message.enabled !== false) {
332
+ writer.uint32(8).bool(message.enabled);
333
+ }
334
+ if (message.agentId !== "") {
335
+ writer.uint32(18).string(message.agentId);
336
+ }
337
+ if (message.gatewayId !== "") {
338
+ writer.uint32(26).string(message.gatewayId);
339
+ }
340
+ if (message.transport !== "") {
341
+ writer.uint32(34).string(message.transport);
342
+ }
343
+ for (const v of message.permissions) {
344
+ Permission.encode(v, writer.uint32(42).fork()).join();
345
+ }
346
+ if (message.maxWorkspaces !== 0) {
347
+ writer.uint32(48).int32(message.maxWorkspaces);
348
+ }
349
+ if (message.idleTimeoutSeconds !== 0) {
350
+ writer.uint32(56).int32(message.idleTimeoutSeconds);
351
+ }
352
+ return writer;
353
+ },
354
+ decode(input, length) {
355
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
356
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
357
+ if (previousRecursionDepth >= 100) {
358
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
359
+ }
360
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
361
+ try {
362
+ const end = length === undefined ? reader.len : reader.pos + length;
363
+ const message = createBaseWorkspacePolicy();
364
+ while (reader.pos < end) {
365
+ const tag = reader.uint32();
366
+ switch (tag >>> 3) {
367
+ case 1: {
368
+ if (tag !== 8) {
369
+ break;
370
+ }
371
+ message.enabled = reader.bool();
372
+ continue;
373
+ }
374
+ case 2: {
375
+ if (tag !== 18) {
376
+ break;
377
+ }
378
+ message.agentId = reader.string();
379
+ continue;
380
+ }
381
+ case 3: {
382
+ if (tag !== 26) {
383
+ break;
384
+ }
385
+ message.gatewayId = reader.string();
386
+ continue;
387
+ }
388
+ case 4: {
389
+ if (tag !== 34) {
390
+ break;
391
+ }
392
+ message.transport = reader.string();
393
+ continue;
394
+ }
395
+ case 5: {
396
+ if (tag !== 42) {
397
+ break;
398
+ }
399
+ message.permissions.push(Permission.decode(reader, reader.uint32()));
400
+ continue;
401
+ }
402
+ case 6: {
403
+ if (tag !== 48) {
404
+ break;
405
+ }
406
+ message.maxWorkspaces = reader.int32();
407
+ continue;
408
+ }
409
+ case 7: {
410
+ if (tag !== 56) {
411
+ break;
412
+ }
413
+ message.idleTimeoutSeconds = reader.int32();
414
+ continue;
415
+ }
416
+ }
417
+ if ((tag & 7) === 4 || tag === 0) {
418
+ break;
419
+ }
420
+ reader.skip(tag & 7);
421
+ }
422
+ return message;
423
+ }
424
+ finally {
425
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
426
+ }
427
+ },
428
+ fromJSON(object) {
429
+ return {
430
+ enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
431
+ agentId: isSet(object.agentId)
432
+ ? globalThis.String(object.agentId)
433
+ : isSet(object.agent_id)
434
+ ? globalThis.String(object.agent_id)
435
+ : "",
436
+ gatewayId: isSet(object.gatewayId)
437
+ ? globalThis.String(object.gatewayId)
438
+ : isSet(object.gateway_id)
439
+ ? globalThis.String(object.gateway_id)
440
+ : "",
441
+ transport: isSet(object.transport) ? globalThis.String(object.transport) : "",
442
+ permissions: globalThis.Array.isArray(object?.permissions)
443
+ ? object.permissions.map((e) => Permission.fromJSON(e))
444
+ : [],
445
+ maxWorkspaces: isSet(object.maxWorkspaces)
446
+ ? globalThis.Number(object.maxWorkspaces)
447
+ : isSet(object.max_workspaces)
448
+ ? globalThis.Number(object.max_workspaces)
449
+ : 0,
450
+ idleTimeoutSeconds: isSet(object.idleTimeoutSeconds)
451
+ ? globalThis.Number(object.idleTimeoutSeconds)
452
+ : isSet(object.idle_timeout_seconds)
453
+ ? globalThis.Number(object.idle_timeout_seconds)
454
+ : 0,
455
+ };
456
+ },
457
+ toJSON(message) {
458
+ const obj = {};
459
+ if (message.enabled !== false) {
460
+ obj.enabled = message.enabled;
461
+ }
462
+ if (message.agentId !== "") {
463
+ obj.agentId = message.agentId;
464
+ }
465
+ if (message.gatewayId !== "") {
466
+ obj.gatewayId = message.gatewayId;
467
+ }
468
+ if (message.transport !== "") {
469
+ obj.transport = message.transport;
470
+ }
471
+ if (message.permissions?.length) {
472
+ obj.permissions = message.permissions.map((e) => Permission.toJSON(e));
473
+ }
474
+ if (message.maxWorkspaces !== 0) {
475
+ obj.maxWorkspaces = Math.round(message.maxWorkspaces);
476
+ }
477
+ if (message.idleTimeoutSeconds !== 0) {
478
+ obj.idleTimeoutSeconds = Math.round(message.idleTimeoutSeconds);
479
+ }
480
+ return obj;
481
+ },
482
+ create(base) {
483
+ return WorkspacePolicy.fromPartial(base ?? {});
484
+ },
485
+ fromPartial(object) {
486
+ const message = createBaseWorkspacePolicy();
487
+ message.enabled = object.enabled ?? false;
488
+ message.agentId = object.agentId ?? "";
489
+ message.gatewayId = object.gatewayId ?? "";
490
+ message.transport = object.transport ?? "";
491
+ message.permissions = object.permissions?.map((e) => Permission.fromPartial(e)) || [];
492
+ message.maxWorkspaces = object.maxWorkspaces ?? 0;
493
+ message.idleTimeoutSeconds = object.idleTimeoutSeconds ?? 0;
494
+ return message;
495
+ },
496
+ };
497
+ function createBaseWorkspace() {
498
+ return {
499
+ id: "",
500
+ orgId: "",
501
+ realmId: "",
502
+ applicationId: "",
503
+ subjectId: "",
504
+ agentId: "",
505
+ agentHostId: "",
506
+ status: "",
507
+ version: 0n,
508
+ createdAt: undefined,
509
+ updatedAt: undefined,
510
+ lastActiveAt: undefined,
511
+ statusReason: "",
512
+ };
513
+ }
514
+ export const Workspace = {
515
+ encode(message, writer = new BinaryWriter()) {
516
+ if (message.id !== "") {
517
+ writer.uint32(10).string(message.id);
518
+ }
519
+ if (message.orgId !== "") {
520
+ writer.uint32(18).string(message.orgId);
521
+ }
522
+ if (message.realmId !== "") {
523
+ writer.uint32(26).string(message.realmId);
524
+ }
525
+ if (message.applicationId !== "") {
526
+ writer.uint32(34).string(message.applicationId);
527
+ }
528
+ if (message.subjectId !== "") {
529
+ writer.uint32(42).string(message.subjectId);
530
+ }
531
+ if (message.agentId !== "") {
532
+ writer.uint32(50).string(message.agentId);
533
+ }
534
+ if (message.agentHostId !== "") {
535
+ writer.uint32(58).string(message.agentHostId);
536
+ }
537
+ if (message.status !== "") {
538
+ writer.uint32(66).string(message.status);
539
+ }
540
+ if (message.version !== 0n) {
541
+ if (BigInt.asIntN(64, message.version) !== message.version) {
542
+ throw new globalThis.Error("value provided for field message.version of type int64 too large");
543
+ }
544
+ writer.uint32(72).int64(message.version);
545
+ }
546
+ if (message.createdAt !== undefined) {
547
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
548
+ }
549
+ if (message.updatedAt !== undefined) {
550
+ Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
551
+ }
552
+ if (message.lastActiveAt !== undefined) {
553
+ Timestamp.encode(toTimestamp(message.lastActiveAt), writer.uint32(98).fork()).join();
554
+ }
555
+ if (message.statusReason !== "") {
556
+ writer.uint32(106).string(message.statusReason);
557
+ }
558
+ return writer;
559
+ },
560
+ decode(input, length) {
561
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
562
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
563
+ if (previousRecursionDepth >= 100) {
564
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
565
+ }
566
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
567
+ try {
568
+ const end = length === undefined ? reader.len : reader.pos + length;
569
+ const message = createBaseWorkspace();
570
+ while (reader.pos < end) {
571
+ const tag = reader.uint32();
572
+ switch (tag >>> 3) {
573
+ case 1: {
574
+ if (tag !== 10) {
575
+ break;
576
+ }
577
+ message.id = reader.string();
578
+ continue;
579
+ }
580
+ case 2: {
581
+ if (tag !== 18) {
582
+ break;
583
+ }
584
+ message.orgId = reader.string();
585
+ continue;
586
+ }
587
+ case 3: {
588
+ if (tag !== 26) {
589
+ break;
590
+ }
591
+ message.realmId = reader.string();
592
+ continue;
593
+ }
594
+ case 4: {
595
+ if (tag !== 34) {
596
+ break;
597
+ }
598
+ message.applicationId = reader.string();
599
+ continue;
600
+ }
601
+ case 5: {
602
+ if (tag !== 42) {
603
+ break;
604
+ }
605
+ message.subjectId = reader.string();
606
+ continue;
607
+ }
608
+ case 6: {
609
+ if (tag !== 50) {
610
+ break;
611
+ }
612
+ message.agentId = reader.string();
613
+ continue;
614
+ }
615
+ case 7: {
616
+ if (tag !== 58) {
617
+ break;
618
+ }
619
+ message.agentHostId = reader.string();
620
+ continue;
621
+ }
622
+ case 8: {
623
+ if (tag !== 66) {
624
+ break;
625
+ }
626
+ message.status = reader.string();
627
+ continue;
628
+ }
629
+ case 9: {
630
+ if (tag !== 72) {
631
+ break;
632
+ }
633
+ message.version = reader.int64();
634
+ continue;
635
+ }
636
+ case 10: {
637
+ if (tag !== 82) {
638
+ break;
639
+ }
640
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
641
+ continue;
642
+ }
643
+ case 11: {
644
+ if (tag !== 90) {
645
+ break;
646
+ }
647
+ message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
648
+ continue;
649
+ }
650
+ case 12: {
651
+ if (tag !== 98) {
652
+ break;
653
+ }
654
+ message.lastActiveAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
655
+ continue;
656
+ }
657
+ case 13: {
658
+ if (tag !== 106) {
659
+ break;
660
+ }
661
+ message.statusReason = reader.string();
662
+ continue;
663
+ }
664
+ }
665
+ if ((tag & 7) === 4 || tag === 0) {
666
+ break;
667
+ }
668
+ reader.skip(tag & 7);
669
+ }
670
+ return message;
671
+ }
672
+ finally {
673
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
674
+ }
675
+ },
676
+ fromJSON(object) {
677
+ return {
678
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
679
+ orgId: isSet(object.orgId)
680
+ ? globalThis.String(object.orgId)
681
+ : isSet(object.org_id)
682
+ ? globalThis.String(object.org_id)
683
+ : "",
684
+ realmId: isSet(object.realmId)
685
+ ? globalThis.String(object.realmId)
686
+ : isSet(object.realm_id)
687
+ ? globalThis.String(object.realm_id)
688
+ : "",
689
+ applicationId: isSet(object.applicationId)
690
+ ? globalThis.String(object.applicationId)
691
+ : isSet(object.application_id)
692
+ ? globalThis.String(object.application_id)
693
+ : "",
694
+ subjectId: isSet(object.subjectId)
695
+ ? globalThis.String(object.subjectId)
696
+ : isSet(object.subject_id)
697
+ ? globalThis.String(object.subject_id)
698
+ : "",
699
+ agentId: isSet(object.agentId)
700
+ ? globalThis.String(object.agentId)
701
+ : isSet(object.agent_id)
702
+ ? globalThis.String(object.agent_id)
703
+ : "",
704
+ agentHostId: isSet(object.agentHostId)
705
+ ? globalThis.String(object.agentHostId)
706
+ : isSet(object.agent_host_id)
707
+ ? globalThis.String(object.agent_host_id)
708
+ : "",
709
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
710
+ version: isSet(object.version) ? BigInt(object.version) : 0n,
711
+ createdAt: isSet(object.createdAt)
712
+ ? fromJsonTimestamp(object.createdAt)
713
+ : isSet(object.created_at)
714
+ ? fromJsonTimestamp(object.created_at)
715
+ : undefined,
716
+ updatedAt: isSet(object.updatedAt)
717
+ ? fromJsonTimestamp(object.updatedAt)
718
+ : isSet(object.updated_at)
719
+ ? fromJsonTimestamp(object.updated_at)
720
+ : undefined,
721
+ lastActiveAt: isSet(object.lastActiveAt)
722
+ ? fromJsonTimestamp(object.lastActiveAt)
723
+ : isSet(object.last_active_at)
724
+ ? fromJsonTimestamp(object.last_active_at)
725
+ : undefined,
726
+ statusReason: isSet(object.statusReason)
727
+ ? globalThis.String(object.statusReason)
728
+ : isSet(object.status_reason)
729
+ ? globalThis.String(object.status_reason)
730
+ : "",
731
+ };
732
+ },
733
+ toJSON(message) {
734
+ const obj = {};
735
+ if (message.id !== "") {
736
+ obj.id = message.id;
737
+ }
738
+ if (message.orgId !== "") {
739
+ obj.orgId = message.orgId;
740
+ }
741
+ if (message.realmId !== "") {
742
+ obj.realmId = message.realmId;
743
+ }
744
+ if (message.applicationId !== "") {
745
+ obj.applicationId = message.applicationId;
746
+ }
747
+ if (message.subjectId !== "") {
748
+ obj.subjectId = message.subjectId;
749
+ }
750
+ if (message.agentId !== "") {
751
+ obj.agentId = message.agentId;
752
+ }
753
+ if (message.agentHostId !== "") {
754
+ obj.agentHostId = message.agentHostId;
755
+ }
756
+ if (message.status !== "") {
757
+ obj.status = message.status;
758
+ }
759
+ if (message.version !== 0n) {
760
+ obj.version = message.version.toString();
761
+ }
762
+ if (message.createdAt !== undefined) {
763
+ obj.createdAt = message.createdAt.toISOString();
764
+ }
765
+ if (message.updatedAt !== undefined) {
766
+ obj.updatedAt = message.updatedAt.toISOString();
767
+ }
768
+ if (message.lastActiveAt !== undefined) {
769
+ obj.lastActiveAt = message.lastActiveAt.toISOString();
770
+ }
771
+ if (message.statusReason !== "") {
772
+ obj.statusReason = message.statusReason;
773
+ }
774
+ return obj;
775
+ },
776
+ create(base) {
777
+ return Workspace.fromPartial(base ?? {});
778
+ },
779
+ fromPartial(object) {
780
+ const message = createBaseWorkspace();
781
+ message.id = object.id ?? "";
782
+ message.orgId = object.orgId ?? "";
783
+ message.realmId = object.realmId ?? "";
784
+ message.applicationId = object.applicationId ?? "";
785
+ message.subjectId = object.subjectId ?? "";
786
+ message.agentId = object.agentId ?? "";
787
+ message.agentHostId = object.agentHostId ?? "";
788
+ message.status = object.status ?? "";
789
+ message.version = (object.version !== undefined && object.version !== null) ? BigInt(object.version) : 0n;
790
+ message.createdAt = object.createdAt ?? undefined;
791
+ message.updatedAt = object.updatedAt ?? undefined;
792
+ message.lastActiveAt = object.lastActiveAt ?? undefined;
793
+ message.statusReason = object.statusReason ?? "";
794
+ return message;
795
+ },
796
+ };
797
+ function createBaseListWorkspacesRequest() {
798
+ return { orgId: "", realmId: "", applicationId: "", pageSize: 0, pageToken: "" };
799
+ }
800
+ export const ListWorkspacesRequest = {
801
+ encode(message, writer = new BinaryWriter()) {
802
+ if (message.orgId !== "") {
803
+ writer.uint32(10).string(message.orgId);
804
+ }
805
+ if (message.realmId !== "") {
806
+ writer.uint32(18).string(message.realmId);
807
+ }
808
+ if (message.applicationId !== "") {
809
+ writer.uint32(26).string(message.applicationId);
810
+ }
811
+ if (message.pageSize !== 0) {
812
+ writer.uint32(32).int32(message.pageSize);
813
+ }
814
+ if (message.pageToken !== "") {
815
+ writer.uint32(42).string(message.pageToken);
816
+ }
817
+ return writer;
818
+ },
819
+ decode(input, length) {
820
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
821
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
822
+ if (previousRecursionDepth >= 100) {
823
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
824
+ }
825
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
826
+ try {
827
+ const end = length === undefined ? reader.len : reader.pos + length;
828
+ const message = createBaseListWorkspacesRequest();
829
+ while (reader.pos < end) {
830
+ const tag = reader.uint32();
831
+ switch (tag >>> 3) {
832
+ case 1: {
833
+ if (tag !== 10) {
834
+ break;
835
+ }
836
+ message.orgId = reader.string();
837
+ continue;
838
+ }
839
+ case 2: {
840
+ if (tag !== 18) {
841
+ break;
842
+ }
843
+ message.realmId = reader.string();
844
+ continue;
845
+ }
846
+ case 3: {
847
+ if (tag !== 26) {
848
+ break;
849
+ }
850
+ message.applicationId = reader.string();
851
+ continue;
852
+ }
853
+ case 4: {
854
+ if (tag !== 32) {
855
+ break;
856
+ }
857
+ message.pageSize = reader.int32();
858
+ continue;
859
+ }
860
+ case 5: {
861
+ if (tag !== 42) {
862
+ break;
863
+ }
864
+ message.pageToken = reader.string();
865
+ continue;
866
+ }
867
+ }
868
+ if ((tag & 7) === 4 || tag === 0) {
869
+ break;
870
+ }
871
+ reader.skip(tag & 7);
872
+ }
873
+ return message;
874
+ }
875
+ finally {
876
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
877
+ }
878
+ },
879
+ fromJSON(object) {
880
+ return {
881
+ orgId: isSet(object.orgId)
882
+ ? globalThis.String(object.orgId)
883
+ : isSet(object.org_id)
884
+ ? globalThis.String(object.org_id)
885
+ : "",
886
+ realmId: isSet(object.realmId)
887
+ ? globalThis.String(object.realmId)
888
+ : isSet(object.realm_id)
889
+ ? globalThis.String(object.realm_id)
890
+ : "",
891
+ applicationId: isSet(object.applicationId)
892
+ ? globalThis.String(object.applicationId)
893
+ : isSet(object.application_id)
894
+ ? globalThis.String(object.application_id)
895
+ : "",
896
+ pageSize: isSet(object.pageSize)
897
+ ? globalThis.Number(object.pageSize)
898
+ : isSet(object.page_size)
899
+ ? globalThis.Number(object.page_size)
900
+ : 0,
901
+ pageToken: isSet(object.pageToken)
902
+ ? globalThis.String(object.pageToken)
903
+ : isSet(object.page_token)
904
+ ? globalThis.String(object.page_token)
905
+ : "",
906
+ };
907
+ },
908
+ toJSON(message) {
909
+ const obj = {};
910
+ if (message.orgId !== "") {
911
+ obj.orgId = message.orgId;
912
+ }
913
+ if (message.realmId !== "") {
914
+ obj.realmId = message.realmId;
915
+ }
916
+ if (message.applicationId !== "") {
917
+ obj.applicationId = message.applicationId;
918
+ }
919
+ if (message.pageSize !== 0) {
920
+ obj.pageSize = Math.round(message.pageSize);
921
+ }
922
+ if (message.pageToken !== "") {
923
+ obj.pageToken = message.pageToken;
924
+ }
925
+ return obj;
926
+ },
927
+ create(base) {
928
+ return ListWorkspacesRequest.fromPartial(base ?? {});
929
+ },
930
+ fromPartial(object) {
931
+ const message = createBaseListWorkspacesRequest();
932
+ message.orgId = object.orgId ?? "";
933
+ message.realmId = object.realmId ?? "";
934
+ message.applicationId = object.applicationId ?? "";
935
+ message.pageSize = object.pageSize ?? 0;
936
+ message.pageToken = object.pageToken ?? "";
937
+ return message;
938
+ },
939
+ };
940
+ function createBaseListWorkspacesResponse() {
941
+ return { items: [], nextPageToken: "" };
942
+ }
943
+ export const ListWorkspacesResponse = {
944
+ encode(message, writer = new BinaryWriter()) {
945
+ for (const v of message.items) {
946
+ Workspace.encode(v, writer.uint32(10).fork()).join();
947
+ }
948
+ if (message.nextPageToken !== "") {
949
+ writer.uint32(18).string(message.nextPageToken);
950
+ }
951
+ return writer;
952
+ },
953
+ decode(input, length) {
954
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
955
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
956
+ if (previousRecursionDepth >= 100) {
957
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
958
+ }
959
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
960
+ try {
961
+ const end = length === undefined ? reader.len : reader.pos + length;
962
+ const message = createBaseListWorkspacesResponse();
963
+ while (reader.pos < end) {
964
+ const tag = reader.uint32();
965
+ switch (tag >>> 3) {
966
+ case 1: {
967
+ if (tag !== 10) {
968
+ break;
969
+ }
970
+ message.items.push(Workspace.decode(reader, reader.uint32()));
971
+ continue;
972
+ }
973
+ case 2: {
974
+ if (tag !== 18) {
975
+ break;
976
+ }
977
+ message.nextPageToken = reader.string();
978
+ continue;
979
+ }
980
+ }
981
+ if ((tag & 7) === 4 || tag === 0) {
982
+ break;
983
+ }
984
+ reader.skip(tag & 7);
985
+ }
986
+ return message;
987
+ }
988
+ finally {
989
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
990
+ }
991
+ },
992
+ fromJSON(object) {
993
+ return {
994
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => Workspace.fromJSON(e)) : [],
995
+ nextPageToken: isSet(object.nextPageToken)
996
+ ? globalThis.String(object.nextPageToken)
997
+ : isSet(object.next_page_token)
998
+ ? globalThis.String(object.next_page_token)
999
+ : "",
1000
+ };
1001
+ },
1002
+ toJSON(message) {
1003
+ const obj = {};
1004
+ if (message.items?.length) {
1005
+ obj.items = message.items.map((e) => Workspace.toJSON(e));
1006
+ }
1007
+ if (message.nextPageToken !== "") {
1008
+ obj.nextPageToken = message.nextPageToken;
1009
+ }
1010
+ return obj;
1011
+ },
1012
+ create(base) {
1013
+ return ListWorkspacesResponse.fromPartial(base ?? {});
1014
+ },
1015
+ fromPartial(object) {
1016
+ const message = createBaseListWorkspacesResponse();
1017
+ message.items = object.items?.map((e) => Workspace.fromPartial(e)) || [];
1018
+ message.nextPageToken = object.nextPageToken ?? "";
1019
+ return message;
1020
+ },
1021
+ };
1022
+ function createBaseGetWorkspaceRequest() {
1023
+ return { orgId: "", realmId: "", applicationId: "", id: "" };
1024
+ }
1025
+ export const GetWorkspaceRequest = {
1026
+ encode(message, writer = new BinaryWriter()) {
1027
+ if (message.orgId !== "") {
1028
+ writer.uint32(10).string(message.orgId);
1029
+ }
1030
+ if (message.realmId !== "") {
1031
+ writer.uint32(18).string(message.realmId);
1032
+ }
1033
+ if (message.applicationId !== "") {
1034
+ writer.uint32(26).string(message.applicationId);
1035
+ }
1036
+ if (message.id !== "") {
1037
+ writer.uint32(34).string(message.id);
1038
+ }
1039
+ return writer;
1040
+ },
1041
+ decode(input, length) {
1042
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1043
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1044
+ if (previousRecursionDepth >= 100) {
1045
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1046
+ }
1047
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1048
+ try {
1049
+ const end = length === undefined ? reader.len : reader.pos + length;
1050
+ const message = createBaseGetWorkspaceRequest();
1051
+ while (reader.pos < end) {
1052
+ const tag = reader.uint32();
1053
+ switch (tag >>> 3) {
1054
+ case 1: {
1055
+ if (tag !== 10) {
1056
+ break;
1057
+ }
1058
+ message.orgId = reader.string();
1059
+ continue;
1060
+ }
1061
+ case 2: {
1062
+ if (tag !== 18) {
1063
+ break;
1064
+ }
1065
+ message.realmId = reader.string();
1066
+ continue;
1067
+ }
1068
+ case 3: {
1069
+ if (tag !== 26) {
1070
+ break;
1071
+ }
1072
+ message.applicationId = reader.string();
1073
+ continue;
1074
+ }
1075
+ case 4: {
1076
+ if (tag !== 34) {
1077
+ break;
1078
+ }
1079
+ message.id = reader.string();
1080
+ continue;
1081
+ }
1082
+ }
1083
+ if ((tag & 7) === 4 || tag === 0) {
1084
+ break;
1085
+ }
1086
+ reader.skip(tag & 7);
1087
+ }
1088
+ return message;
1089
+ }
1090
+ finally {
1091
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1092
+ }
1093
+ },
1094
+ fromJSON(object) {
1095
+ return {
1096
+ orgId: isSet(object.orgId)
1097
+ ? globalThis.String(object.orgId)
1098
+ : isSet(object.org_id)
1099
+ ? globalThis.String(object.org_id)
1100
+ : "",
1101
+ realmId: isSet(object.realmId)
1102
+ ? globalThis.String(object.realmId)
1103
+ : isSet(object.realm_id)
1104
+ ? globalThis.String(object.realm_id)
1105
+ : "",
1106
+ applicationId: isSet(object.applicationId)
1107
+ ? globalThis.String(object.applicationId)
1108
+ : isSet(object.application_id)
1109
+ ? globalThis.String(object.application_id)
1110
+ : "",
1111
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1112
+ };
1113
+ },
1114
+ toJSON(message) {
1115
+ const obj = {};
1116
+ if (message.orgId !== "") {
1117
+ obj.orgId = message.orgId;
1118
+ }
1119
+ if (message.realmId !== "") {
1120
+ obj.realmId = message.realmId;
1121
+ }
1122
+ if (message.applicationId !== "") {
1123
+ obj.applicationId = message.applicationId;
1124
+ }
1125
+ if (message.id !== "") {
1126
+ obj.id = message.id;
1127
+ }
1128
+ return obj;
1129
+ },
1130
+ create(base) {
1131
+ return GetWorkspaceRequest.fromPartial(base ?? {});
1132
+ },
1133
+ fromPartial(object) {
1134
+ const message = createBaseGetWorkspaceRequest();
1135
+ message.orgId = object.orgId ?? "";
1136
+ message.realmId = object.realmId ?? "";
1137
+ message.applicationId = object.applicationId ?? "";
1138
+ message.id = object.id ?? "";
1139
+ return message;
1140
+ },
1141
+ };
1142
+ function createBasePauseWorkspaceRequest() {
1143
+ return { orgId: "", realmId: "", applicationId: "", id: "", expectedVersion: 0n };
1144
+ }
1145
+ export const PauseWorkspaceRequest = {
1146
+ encode(message, writer = new BinaryWriter()) {
1147
+ if (message.orgId !== "") {
1148
+ writer.uint32(10).string(message.orgId);
1149
+ }
1150
+ if (message.realmId !== "") {
1151
+ writer.uint32(18).string(message.realmId);
1152
+ }
1153
+ if (message.applicationId !== "") {
1154
+ writer.uint32(26).string(message.applicationId);
1155
+ }
1156
+ if (message.id !== "") {
1157
+ writer.uint32(34).string(message.id);
1158
+ }
1159
+ if (message.expectedVersion !== 0n) {
1160
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1161
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1162
+ }
1163
+ writer.uint32(40).int64(message.expectedVersion);
1164
+ }
1165
+ return writer;
1166
+ },
1167
+ decode(input, length) {
1168
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1169
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1170
+ if (previousRecursionDepth >= 100) {
1171
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1172
+ }
1173
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1174
+ try {
1175
+ const end = length === undefined ? reader.len : reader.pos + length;
1176
+ const message = createBasePauseWorkspaceRequest();
1177
+ while (reader.pos < end) {
1178
+ const tag = reader.uint32();
1179
+ switch (tag >>> 3) {
1180
+ case 1: {
1181
+ if (tag !== 10) {
1182
+ break;
1183
+ }
1184
+ message.orgId = reader.string();
1185
+ continue;
1186
+ }
1187
+ case 2: {
1188
+ if (tag !== 18) {
1189
+ break;
1190
+ }
1191
+ message.realmId = reader.string();
1192
+ continue;
1193
+ }
1194
+ case 3: {
1195
+ if (tag !== 26) {
1196
+ break;
1197
+ }
1198
+ message.applicationId = reader.string();
1199
+ continue;
1200
+ }
1201
+ case 4: {
1202
+ if (tag !== 34) {
1203
+ break;
1204
+ }
1205
+ message.id = reader.string();
1206
+ continue;
1207
+ }
1208
+ case 5: {
1209
+ if (tag !== 40) {
1210
+ break;
1211
+ }
1212
+ message.expectedVersion = reader.int64();
1213
+ continue;
1214
+ }
1215
+ }
1216
+ if ((tag & 7) === 4 || tag === 0) {
1217
+ break;
1218
+ }
1219
+ reader.skip(tag & 7);
1220
+ }
1221
+ return message;
1222
+ }
1223
+ finally {
1224
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1225
+ }
1226
+ },
1227
+ fromJSON(object) {
1228
+ return {
1229
+ orgId: isSet(object.orgId)
1230
+ ? globalThis.String(object.orgId)
1231
+ : isSet(object.org_id)
1232
+ ? globalThis.String(object.org_id)
1233
+ : "",
1234
+ realmId: isSet(object.realmId)
1235
+ ? globalThis.String(object.realmId)
1236
+ : isSet(object.realm_id)
1237
+ ? globalThis.String(object.realm_id)
1238
+ : "",
1239
+ applicationId: isSet(object.applicationId)
1240
+ ? globalThis.String(object.applicationId)
1241
+ : isSet(object.application_id)
1242
+ ? globalThis.String(object.application_id)
1243
+ : "",
1244
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1245
+ expectedVersion: isSet(object.expectedVersion)
1246
+ ? BigInt(object.expectedVersion)
1247
+ : isSet(object.expected_version)
1248
+ ? BigInt(object.expected_version)
1249
+ : 0n,
1250
+ };
1251
+ },
1252
+ toJSON(message) {
1253
+ const obj = {};
1254
+ if (message.orgId !== "") {
1255
+ obj.orgId = message.orgId;
1256
+ }
1257
+ if (message.realmId !== "") {
1258
+ obj.realmId = message.realmId;
1259
+ }
1260
+ if (message.applicationId !== "") {
1261
+ obj.applicationId = message.applicationId;
1262
+ }
1263
+ if (message.id !== "") {
1264
+ obj.id = message.id;
1265
+ }
1266
+ if (message.expectedVersion !== 0n) {
1267
+ obj.expectedVersion = message.expectedVersion.toString();
1268
+ }
1269
+ return obj;
1270
+ },
1271
+ create(base) {
1272
+ return PauseWorkspaceRequest.fromPartial(base ?? {});
1273
+ },
1274
+ fromPartial(object) {
1275
+ const message = createBasePauseWorkspaceRequest();
1276
+ message.orgId = object.orgId ?? "";
1277
+ message.realmId = object.realmId ?? "";
1278
+ message.applicationId = object.applicationId ?? "";
1279
+ message.id = object.id ?? "";
1280
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1281
+ ? BigInt(object.expectedVersion)
1282
+ : 0n;
1283
+ return message;
1284
+ },
1285
+ };
1286
+ function createBaseResumeWorkspaceRequest() {
1287
+ return { orgId: "", realmId: "", applicationId: "", id: "", expectedVersion: 0n };
1288
+ }
1289
+ export const ResumeWorkspaceRequest = {
1290
+ encode(message, writer = new BinaryWriter()) {
1291
+ if (message.orgId !== "") {
1292
+ writer.uint32(10).string(message.orgId);
1293
+ }
1294
+ if (message.realmId !== "") {
1295
+ writer.uint32(18).string(message.realmId);
1296
+ }
1297
+ if (message.applicationId !== "") {
1298
+ writer.uint32(26).string(message.applicationId);
1299
+ }
1300
+ if (message.id !== "") {
1301
+ writer.uint32(34).string(message.id);
1302
+ }
1303
+ if (message.expectedVersion !== 0n) {
1304
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1305
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1306
+ }
1307
+ writer.uint32(40).int64(message.expectedVersion);
1308
+ }
1309
+ return writer;
1310
+ },
1311
+ decode(input, length) {
1312
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1313
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1314
+ if (previousRecursionDepth >= 100) {
1315
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1316
+ }
1317
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1318
+ try {
1319
+ const end = length === undefined ? reader.len : reader.pos + length;
1320
+ const message = createBaseResumeWorkspaceRequest();
1321
+ while (reader.pos < end) {
1322
+ const tag = reader.uint32();
1323
+ switch (tag >>> 3) {
1324
+ case 1: {
1325
+ if (tag !== 10) {
1326
+ break;
1327
+ }
1328
+ message.orgId = reader.string();
1329
+ continue;
1330
+ }
1331
+ case 2: {
1332
+ if (tag !== 18) {
1333
+ break;
1334
+ }
1335
+ message.realmId = reader.string();
1336
+ continue;
1337
+ }
1338
+ case 3: {
1339
+ if (tag !== 26) {
1340
+ break;
1341
+ }
1342
+ message.applicationId = reader.string();
1343
+ continue;
1344
+ }
1345
+ case 4: {
1346
+ if (tag !== 34) {
1347
+ break;
1348
+ }
1349
+ message.id = reader.string();
1350
+ continue;
1351
+ }
1352
+ case 5: {
1353
+ if (tag !== 40) {
1354
+ break;
1355
+ }
1356
+ message.expectedVersion = reader.int64();
1357
+ continue;
1358
+ }
1359
+ }
1360
+ if ((tag & 7) === 4 || tag === 0) {
1361
+ break;
1362
+ }
1363
+ reader.skip(tag & 7);
1364
+ }
1365
+ return message;
1366
+ }
1367
+ finally {
1368
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1369
+ }
1370
+ },
1371
+ fromJSON(object) {
1372
+ return {
1373
+ orgId: isSet(object.orgId)
1374
+ ? globalThis.String(object.orgId)
1375
+ : isSet(object.org_id)
1376
+ ? globalThis.String(object.org_id)
1377
+ : "",
1378
+ realmId: isSet(object.realmId)
1379
+ ? globalThis.String(object.realmId)
1380
+ : isSet(object.realm_id)
1381
+ ? globalThis.String(object.realm_id)
1382
+ : "",
1383
+ applicationId: isSet(object.applicationId)
1384
+ ? globalThis.String(object.applicationId)
1385
+ : isSet(object.application_id)
1386
+ ? globalThis.String(object.application_id)
1387
+ : "",
1388
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1389
+ expectedVersion: isSet(object.expectedVersion)
1390
+ ? BigInt(object.expectedVersion)
1391
+ : isSet(object.expected_version)
1392
+ ? BigInt(object.expected_version)
1393
+ : 0n,
1394
+ };
1395
+ },
1396
+ toJSON(message) {
1397
+ const obj = {};
1398
+ if (message.orgId !== "") {
1399
+ obj.orgId = message.orgId;
1400
+ }
1401
+ if (message.realmId !== "") {
1402
+ obj.realmId = message.realmId;
1403
+ }
1404
+ if (message.applicationId !== "") {
1405
+ obj.applicationId = message.applicationId;
1406
+ }
1407
+ if (message.id !== "") {
1408
+ obj.id = message.id;
1409
+ }
1410
+ if (message.expectedVersion !== 0n) {
1411
+ obj.expectedVersion = message.expectedVersion.toString();
1412
+ }
1413
+ return obj;
1414
+ },
1415
+ create(base) {
1416
+ return ResumeWorkspaceRequest.fromPartial(base ?? {});
1417
+ },
1418
+ fromPartial(object) {
1419
+ const message = createBaseResumeWorkspaceRequest();
1420
+ message.orgId = object.orgId ?? "";
1421
+ message.realmId = object.realmId ?? "";
1422
+ message.applicationId = object.applicationId ?? "";
1423
+ message.id = object.id ?? "";
1424
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1425
+ ? BigInt(object.expectedVersion)
1426
+ : 0n;
1427
+ return message;
1428
+ },
1429
+ };
1430
+ function createBaseDeleteWorkspaceRequest() {
1431
+ return { orgId: "", realmId: "", applicationId: "", id: "", expectedVersion: 0n };
1432
+ }
1433
+ export const DeleteWorkspaceRequest = {
1434
+ encode(message, writer = new BinaryWriter()) {
1435
+ if (message.orgId !== "") {
1436
+ writer.uint32(10).string(message.orgId);
1437
+ }
1438
+ if (message.realmId !== "") {
1439
+ writer.uint32(18).string(message.realmId);
1440
+ }
1441
+ if (message.applicationId !== "") {
1442
+ writer.uint32(26).string(message.applicationId);
1443
+ }
1444
+ if (message.id !== "") {
1445
+ writer.uint32(34).string(message.id);
1446
+ }
1447
+ if (message.expectedVersion !== 0n) {
1448
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1449
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1450
+ }
1451
+ writer.uint32(40).int64(message.expectedVersion);
1452
+ }
1453
+ return writer;
1454
+ },
1455
+ decode(input, length) {
1456
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1457
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1458
+ if (previousRecursionDepth >= 100) {
1459
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1460
+ }
1461
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1462
+ try {
1463
+ const end = length === undefined ? reader.len : reader.pos + length;
1464
+ const message = createBaseDeleteWorkspaceRequest();
1465
+ while (reader.pos < end) {
1466
+ const tag = reader.uint32();
1467
+ switch (tag >>> 3) {
1468
+ case 1: {
1469
+ if (tag !== 10) {
1470
+ break;
1471
+ }
1472
+ message.orgId = reader.string();
1473
+ continue;
1474
+ }
1475
+ case 2: {
1476
+ if (tag !== 18) {
1477
+ break;
1478
+ }
1479
+ message.realmId = reader.string();
1480
+ continue;
1481
+ }
1482
+ case 3: {
1483
+ if (tag !== 26) {
1484
+ break;
1485
+ }
1486
+ message.applicationId = reader.string();
1487
+ continue;
1488
+ }
1489
+ case 4: {
1490
+ if (tag !== 34) {
1491
+ break;
1492
+ }
1493
+ message.id = reader.string();
1494
+ continue;
1495
+ }
1496
+ case 5: {
1497
+ if (tag !== 40) {
1498
+ break;
1499
+ }
1500
+ message.expectedVersion = reader.int64();
1501
+ continue;
1502
+ }
1503
+ }
1504
+ if ((tag & 7) === 4 || tag === 0) {
1505
+ break;
1506
+ }
1507
+ reader.skip(tag & 7);
1508
+ }
1509
+ return message;
1510
+ }
1511
+ finally {
1512
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1513
+ }
1514
+ },
1515
+ fromJSON(object) {
1516
+ return {
1517
+ orgId: isSet(object.orgId)
1518
+ ? globalThis.String(object.orgId)
1519
+ : isSet(object.org_id)
1520
+ ? globalThis.String(object.org_id)
1521
+ : "",
1522
+ realmId: isSet(object.realmId)
1523
+ ? globalThis.String(object.realmId)
1524
+ : isSet(object.realm_id)
1525
+ ? globalThis.String(object.realm_id)
1526
+ : "",
1527
+ applicationId: isSet(object.applicationId)
1528
+ ? globalThis.String(object.applicationId)
1529
+ : isSet(object.application_id)
1530
+ ? globalThis.String(object.application_id)
1531
+ : "",
1532
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1533
+ expectedVersion: isSet(object.expectedVersion)
1534
+ ? BigInt(object.expectedVersion)
1535
+ : isSet(object.expected_version)
1536
+ ? BigInt(object.expected_version)
1537
+ : 0n,
1538
+ };
1539
+ },
1540
+ toJSON(message) {
1541
+ const obj = {};
1542
+ if (message.orgId !== "") {
1543
+ obj.orgId = message.orgId;
1544
+ }
1545
+ if (message.realmId !== "") {
1546
+ obj.realmId = message.realmId;
1547
+ }
1548
+ if (message.applicationId !== "") {
1549
+ obj.applicationId = message.applicationId;
1550
+ }
1551
+ if (message.id !== "") {
1552
+ obj.id = message.id;
1553
+ }
1554
+ if (message.expectedVersion !== 0n) {
1555
+ obj.expectedVersion = message.expectedVersion.toString();
1556
+ }
1557
+ return obj;
1558
+ },
1559
+ create(base) {
1560
+ return DeleteWorkspaceRequest.fromPartial(base ?? {});
1561
+ },
1562
+ fromPartial(object) {
1563
+ const message = createBaseDeleteWorkspaceRequest();
1564
+ message.orgId = object.orgId ?? "";
1565
+ message.realmId = object.realmId ?? "";
1566
+ message.applicationId = object.applicationId ?? "";
1567
+ message.id = object.id ?? "";
1568
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1569
+ ? BigInt(object.expectedVersion)
1570
+ : 0n;
1571
+ return message;
1572
+ },
1573
+ };
1574
+ function createBaseCreateApplicationRequest() {
1575
+ return { orgId: "", realmId: "", application: undefined };
1576
+ }
1577
+ export const CreateApplicationRequest = {
1578
+ encode(message, writer = new BinaryWriter()) {
1579
+ if (message.orgId !== "") {
1580
+ writer.uint32(10).string(message.orgId);
1581
+ }
1582
+ if (message.realmId !== "") {
1583
+ writer.uint32(18).string(message.realmId);
1584
+ }
1585
+ if (message.application !== undefined) {
1586
+ Application.encode(message.application, writer.uint32(26).fork()).join();
1587
+ }
1588
+ return writer;
1589
+ },
1590
+ decode(input, length) {
1591
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1592
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1593
+ if (previousRecursionDepth >= 100) {
1594
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1595
+ }
1596
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1597
+ try {
1598
+ const end = length === undefined ? reader.len : reader.pos + length;
1599
+ const message = createBaseCreateApplicationRequest();
1600
+ while (reader.pos < end) {
1601
+ const tag = reader.uint32();
1602
+ switch (tag >>> 3) {
1603
+ case 1: {
1604
+ if (tag !== 10) {
1605
+ break;
1606
+ }
1607
+ message.orgId = reader.string();
1608
+ continue;
1609
+ }
1610
+ case 2: {
1611
+ if (tag !== 18) {
1612
+ break;
1613
+ }
1614
+ message.realmId = reader.string();
1615
+ continue;
1616
+ }
1617
+ case 3: {
1618
+ if (tag !== 26) {
1619
+ break;
1620
+ }
1621
+ message.application = Application.decode(reader, reader.uint32());
1622
+ continue;
1623
+ }
1624
+ }
1625
+ if ((tag & 7) === 4 || tag === 0) {
1626
+ break;
1627
+ }
1628
+ reader.skip(tag & 7);
1629
+ }
1630
+ return message;
1631
+ }
1632
+ finally {
1633
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1634
+ }
1635
+ },
1636
+ fromJSON(object) {
1637
+ return {
1638
+ orgId: isSet(object.orgId)
1639
+ ? globalThis.String(object.orgId)
1640
+ : isSet(object.org_id)
1641
+ ? globalThis.String(object.org_id)
1642
+ : "",
1643
+ realmId: isSet(object.realmId)
1644
+ ? globalThis.String(object.realmId)
1645
+ : isSet(object.realm_id)
1646
+ ? globalThis.String(object.realm_id)
1647
+ : "",
1648
+ application: isSet(object.application) ? Application.fromJSON(object.application) : undefined,
1649
+ };
1650
+ },
1651
+ toJSON(message) {
1652
+ const obj = {};
1653
+ if (message.orgId !== "") {
1654
+ obj.orgId = message.orgId;
1655
+ }
1656
+ if (message.realmId !== "") {
1657
+ obj.realmId = message.realmId;
1658
+ }
1659
+ if (message.application !== undefined) {
1660
+ obj.application = Application.toJSON(message.application);
1661
+ }
1662
+ return obj;
1663
+ },
1664
+ create(base) {
1665
+ return CreateApplicationRequest.fromPartial(base ?? {});
1666
+ },
1667
+ fromPartial(object) {
1668
+ const message = createBaseCreateApplicationRequest();
1669
+ message.orgId = object.orgId ?? "";
1670
+ message.realmId = object.realmId ?? "";
1671
+ message.application = (object.application !== undefined && object.application !== null)
1672
+ ? Application.fromPartial(object.application)
1673
+ : undefined;
1674
+ return message;
1675
+ },
1676
+ };
1677
+ function createBaseUpdateApplicationRequest() {
1678
+ return { orgId: "", realmId: "", id: "", application: undefined, expectedVersion: 0n };
1679
+ }
1680
+ export const UpdateApplicationRequest = {
1681
+ encode(message, writer = new BinaryWriter()) {
1682
+ if (message.orgId !== "") {
1683
+ writer.uint32(10).string(message.orgId);
1684
+ }
1685
+ if (message.realmId !== "") {
1686
+ writer.uint32(18).string(message.realmId);
1687
+ }
1688
+ if (message.id !== "") {
1689
+ writer.uint32(26).string(message.id);
1690
+ }
1691
+ if (message.application !== undefined) {
1692
+ Application.encode(message.application, writer.uint32(34).fork()).join();
1693
+ }
1694
+ if (message.expectedVersion !== 0n) {
1695
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1696
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1697
+ }
1698
+ writer.uint32(40).int64(message.expectedVersion);
1699
+ }
1700
+ return writer;
1701
+ },
1702
+ decode(input, length) {
1703
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1704
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1705
+ if (previousRecursionDepth >= 100) {
1706
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1707
+ }
1708
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1709
+ try {
1710
+ const end = length === undefined ? reader.len : reader.pos + length;
1711
+ const message = createBaseUpdateApplicationRequest();
1712
+ while (reader.pos < end) {
1713
+ const tag = reader.uint32();
1714
+ switch (tag >>> 3) {
1715
+ case 1: {
1716
+ if (tag !== 10) {
1717
+ break;
1718
+ }
1719
+ message.orgId = reader.string();
1720
+ continue;
1721
+ }
1722
+ case 2: {
1723
+ if (tag !== 18) {
1724
+ break;
1725
+ }
1726
+ message.realmId = reader.string();
1727
+ continue;
1728
+ }
1729
+ case 3: {
1730
+ if (tag !== 26) {
1731
+ break;
1732
+ }
1733
+ message.id = reader.string();
1734
+ continue;
1735
+ }
1736
+ case 4: {
1737
+ if (tag !== 34) {
1738
+ break;
1739
+ }
1740
+ message.application = Application.decode(reader, reader.uint32());
1741
+ continue;
1742
+ }
1743
+ case 5: {
1744
+ if (tag !== 40) {
1745
+ break;
1746
+ }
1747
+ message.expectedVersion = reader.int64();
1748
+ continue;
1749
+ }
1750
+ }
1751
+ if ((tag & 7) === 4 || tag === 0) {
1752
+ break;
1753
+ }
1754
+ reader.skip(tag & 7);
1755
+ }
1756
+ return message;
1757
+ }
1758
+ finally {
1759
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1760
+ }
1761
+ },
1762
+ fromJSON(object) {
1763
+ return {
1764
+ orgId: isSet(object.orgId)
1765
+ ? globalThis.String(object.orgId)
1766
+ : isSet(object.org_id)
1767
+ ? globalThis.String(object.org_id)
1768
+ : "",
1769
+ realmId: isSet(object.realmId)
1770
+ ? globalThis.String(object.realmId)
1771
+ : isSet(object.realm_id)
1772
+ ? globalThis.String(object.realm_id)
1773
+ : "",
1774
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1775
+ application: isSet(object.application) ? Application.fromJSON(object.application) : undefined,
1776
+ expectedVersion: isSet(object.expectedVersion)
1777
+ ? BigInt(object.expectedVersion)
1778
+ : isSet(object.expected_version)
1779
+ ? BigInt(object.expected_version)
1780
+ : 0n,
1781
+ };
1782
+ },
1783
+ toJSON(message) {
1784
+ const obj = {};
1785
+ if (message.orgId !== "") {
1786
+ obj.orgId = message.orgId;
1787
+ }
1788
+ if (message.realmId !== "") {
1789
+ obj.realmId = message.realmId;
1790
+ }
1791
+ if (message.id !== "") {
1792
+ obj.id = message.id;
1793
+ }
1794
+ if (message.application !== undefined) {
1795
+ obj.application = Application.toJSON(message.application);
1796
+ }
1797
+ if (message.expectedVersion !== 0n) {
1798
+ obj.expectedVersion = message.expectedVersion.toString();
1799
+ }
1800
+ return obj;
1801
+ },
1802
+ create(base) {
1803
+ return UpdateApplicationRequest.fromPartial(base ?? {});
1804
+ },
1805
+ fromPartial(object) {
1806
+ const message = createBaseUpdateApplicationRequest();
1807
+ message.orgId = object.orgId ?? "";
1808
+ message.realmId = object.realmId ?? "";
1809
+ message.id = object.id ?? "";
1810
+ message.application = (object.application !== undefined && object.application !== null)
1811
+ ? Application.fromPartial(object.application)
1812
+ : undefined;
1813
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
1814
+ ? BigInt(object.expectedVersion)
1815
+ : 0n;
1816
+ return message;
1817
+ },
1818
+ };
1819
+ function createBaseGetApplicationRequest() {
1820
+ return { orgId: "", realmId: "", id: "" };
1821
+ }
1822
+ export const GetApplicationRequest = {
1823
+ encode(message, writer = new BinaryWriter()) {
1824
+ if (message.orgId !== "") {
1825
+ writer.uint32(10).string(message.orgId);
1826
+ }
1827
+ if (message.realmId !== "") {
1828
+ writer.uint32(18).string(message.realmId);
1829
+ }
1830
+ if (message.id !== "") {
1831
+ writer.uint32(26).string(message.id);
1832
+ }
1833
+ return writer;
1834
+ },
1835
+ decode(input, length) {
1836
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1837
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1838
+ if (previousRecursionDepth >= 100) {
1839
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1840
+ }
1841
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1842
+ try {
1843
+ const end = length === undefined ? reader.len : reader.pos + length;
1844
+ const message = createBaseGetApplicationRequest();
1845
+ while (reader.pos < end) {
1846
+ const tag = reader.uint32();
1847
+ switch (tag >>> 3) {
1848
+ case 1: {
1849
+ if (tag !== 10) {
1850
+ break;
1851
+ }
1852
+ message.orgId = reader.string();
1853
+ continue;
1854
+ }
1855
+ case 2: {
1856
+ if (tag !== 18) {
1857
+ break;
1858
+ }
1859
+ message.realmId = reader.string();
1860
+ continue;
1861
+ }
1862
+ case 3: {
1863
+ if (tag !== 26) {
1864
+ break;
1865
+ }
1866
+ message.id = reader.string();
1867
+ continue;
1868
+ }
1869
+ }
1870
+ if ((tag & 7) === 4 || tag === 0) {
1871
+ break;
1872
+ }
1873
+ reader.skip(tag & 7);
1874
+ }
1875
+ return message;
1876
+ }
1877
+ finally {
1878
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1879
+ }
1880
+ },
1881
+ fromJSON(object) {
1882
+ return {
1883
+ orgId: isSet(object.orgId)
1884
+ ? globalThis.String(object.orgId)
1885
+ : isSet(object.org_id)
1886
+ ? globalThis.String(object.org_id)
1887
+ : "",
1888
+ realmId: isSet(object.realmId)
1889
+ ? globalThis.String(object.realmId)
1890
+ : isSet(object.realm_id)
1891
+ ? globalThis.String(object.realm_id)
1892
+ : "",
1893
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1894
+ };
1895
+ },
1896
+ toJSON(message) {
1897
+ const obj = {};
1898
+ if (message.orgId !== "") {
1899
+ obj.orgId = message.orgId;
1900
+ }
1901
+ if (message.realmId !== "") {
1902
+ obj.realmId = message.realmId;
1903
+ }
1904
+ if (message.id !== "") {
1905
+ obj.id = message.id;
1906
+ }
1907
+ return obj;
1908
+ },
1909
+ create(base) {
1910
+ return GetApplicationRequest.fromPartial(base ?? {});
1911
+ },
1912
+ fromPartial(object) {
1913
+ const message = createBaseGetApplicationRequest();
1914
+ message.orgId = object.orgId ?? "";
1915
+ message.realmId = object.realmId ?? "";
1916
+ message.id = object.id ?? "";
1917
+ return message;
1918
+ },
1919
+ };
1920
+ function createBaseDeleteApplicationRequest() {
1921
+ return { orgId: "", realmId: "", id: "", expectedVersion: 0n };
1922
+ }
1923
+ export const DeleteApplicationRequest = {
1924
+ encode(message, writer = new BinaryWriter()) {
1925
+ if (message.orgId !== "") {
1926
+ writer.uint32(10).string(message.orgId);
1927
+ }
1928
+ if (message.realmId !== "") {
1929
+ writer.uint32(18).string(message.realmId);
1930
+ }
1931
+ if (message.id !== "") {
1932
+ writer.uint32(26).string(message.id);
1933
+ }
1934
+ if (message.expectedVersion !== 0n) {
1935
+ if (BigInt.asIntN(64, message.expectedVersion) !== message.expectedVersion) {
1936
+ throw new globalThis.Error("value provided for field message.expectedVersion of type int64 too large");
1937
+ }
1938
+ writer.uint32(32).int64(message.expectedVersion);
1939
+ }
1940
+ return writer;
1941
+ },
1942
+ decode(input, length) {
1943
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1944
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1945
+ if (previousRecursionDepth >= 100) {
1946
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1947
+ }
1948
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1949
+ try {
1950
+ const end = length === undefined ? reader.len : reader.pos + length;
1951
+ const message = createBaseDeleteApplicationRequest();
1952
+ while (reader.pos < end) {
1953
+ const tag = reader.uint32();
1954
+ switch (tag >>> 3) {
1955
+ case 1: {
1956
+ if (tag !== 10) {
1957
+ break;
1958
+ }
1959
+ message.orgId = reader.string();
1960
+ continue;
1961
+ }
1962
+ case 2: {
1963
+ if (tag !== 18) {
1964
+ break;
1965
+ }
1966
+ message.realmId = reader.string();
1967
+ continue;
1968
+ }
1969
+ case 3: {
1970
+ if (tag !== 26) {
1971
+ break;
1972
+ }
1973
+ message.id = reader.string();
1974
+ continue;
1975
+ }
1976
+ case 4: {
1977
+ if (tag !== 32) {
1978
+ break;
1979
+ }
1980
+ message.expectedVersion = reader.int64();
1981
+ continue;
1982
+ }
1983
+ }
1984
+ if ((tag & 7) === 4 || tag === 0) {
1985
+ break;
1986
+ }
1987
+ reader.skip(tag & 7);
1988
+ }
1989
+ return message;
1990
+ }
1991
+ finally {
1992
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1993
+ }
1994
+ },
1995
+ fromJSON(object) {
1996
+ return {
1997
+ orgId: isSet(object.orgId)
1998
+ ? globalThis.String(object.orgId)
1999
+ : isSet(object.org_id)
2000
+ ? globalThis.String(object.org_id)
2001
+ : "",
2002
+ realmId: isSet(object.realmId)
2003
+ ? globalThis.String(object.realmId)
2004
+ : isSet(object.realm_id)
2005
+ ? globalThis.String(object.realm_id)
2006
+ : "",
2007
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
2008
+ expectedVersion: isSet(object.expectedVersion)
2009
+ ? BigInt(object.expectedVersion)
2010
+ : isSet(object.expected_version)
2011
+ ? BigInt(object.expected_version)
2012
+ : 0n,
2013
+ };
2014
+ },
2015
+ toJSON(message) {
2016
+ const obj = {};
2017
+ if (message.orgId !== "") {
2018
+ obj.orgId = message.orgId;
2019
+ }
2020
+ if (message.realmId !== "") {
2021
+ obj.realmId = message.realmId;
2022
+ }
2023
+ if (message.id !== "") {
2024
+ obj.id = message.id;
2025
+ }
2026
+ if (message.expectedVersion !== 0n) {
2027
+ obj.expectedVersion = message.expectedVersion.toString();
2028
+ }
2029
+ return obj;
2030
+ },
2031
+ create(base) {
2032
+ return DeleteApplicationRequest.fromPartial(base ?? {});
2033
+ },
2034
+ fromPartial(object) {
2035
+ const message = createBaseDeleteApplicationRequest();
2036
+ message.orgId = object.orgId ?? "";
2037
+ message.realmId = object.realmId ?? "";
2038
+ message.id = object.id ?? "";
2039
+ message.expectedVersion = (object.expectedVersion !== undefined && object.expectedVersion !== null)
2040
+ ? BigInt(object.expectedVersion)
2041
+ : 0n;
2042
+ return message;
2043
+ },
2044
+ };
2045
+ function createBaseListApplicationsRequest() {
2046
+ return { orgId: "", realmId: "", pageSize: 0, pageToken: "" };
2047
+ }
2048
+ export const ListApplicationsRequest = {
2049
+ encode(message, writer = new BinaryWriter()) {
2050
+ if (message.orgId !== "") {
2051
+ writer.uint32(10).string(message.orgId);
2052
+ }
2053
+ if (message.realmId !== "") {
2054
+ writer.uint32(18).string(message.realmId);
2055
+ }
2056
+ if (message.pageSize !== 0) {
2057
+ writer.uint32(24).int32(message.pageSize);
2058
+ }
2059
+ if (message.pageToken !== "") {
2060
+ writer.uint32(34).string(message.pageToken);
2061
+ }
2062
+ return writer;
2063
+ },
2064
+ decode(input, length) {
2065
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2066
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2067
+ if (previousRecursionDepth >= 100) {
2068
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2069
+ }
2070
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2071
+ try {
2072
+ const end = length === undefined ? reader.len : reader.pos + length;
2073
+ const message = createBaseListApplicationsRequest();
2074
+ while (reader.pos < end) {
2075
+ const tag = reader.uint32();
2076
+ switch (tag >>> 3) {
2077
+ case 1: {
2078
+ if (tag !== 10) {
2079
+ break;
2080
+ }
2081
+ message.orgId = reader.string();
2082
+ continue;
2083
+ }
2084
+ case 2: {
2085
+ if (tag !== 18) {
2086
+ break;
2087
+ }
2088
+ message.realmId = reader.string();
2089
+ continue;
2090
+ }
2091
+ case 3: {
2092
+ if (tag !== 24) {
2093
+ break;
2094
+ }
2095
+ message.pageSize = reader.int32();
2096
+ continue;
2097
+ }
2098
+ case 4: {
2099
+ if (tag !== 34) {
2100
+ break;
2101
+ }
2102
+ message.pageToken = reader.string();
2103
+ continue;
2104
+ }
2105
+ }
2106
+ if ((tag & 7) === 4 || tag === 0) {
2107
+ break;
2108
+ }
2109
+ reader.skip(tag & 7);
2110
+ }
2111
+ return message;
2112
+ }
2113
+ finally {
2114
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2115
+ }
2116
+ },
2117
+ fromJSON(object) {
2118
+ return {
2119
+ orgId: isSet(object.orgId)
2120
+ ? globalThis.String(object.orgId)
2121
+ : isSet(object.org_id)
2122
+ ? globalThis.String(object.org_id)
2123
+ : "",
2124
+ realmId: isSet(object.realmId)
2125
+ ? globalThis.String(object.realmId)
2126
+ : isSet(object.realm_id)
2127
+ ? globalThis.String(object.realm_id)
2128
+ : "",
2129
+ pageSize: isSet(object.pageSize)
2130
+ ? globalThis.Number(object.pageSize)
2131
+ : isSet(object.page_size)
2132
+ ? globalThis.Number(object.page_size)
2133
+ : 0,
2134
+ pageToken: isSet(object.pageToken)
2135
+ ? globalThis.String(object.pageToken)
2136
+ : isSet(object.page_token)
2137
+ ? globalThis.String(object.page_token)
2138
+ : "",
2139
+ };
2140
+ },
2141
+ toJSON(message) {
2142
+ const obj = {};
2143
+ if (message.orgId !== "") {
2144
+ obj.orgId = message.orgId;
2145
+ }
2146
+ if (message.realmId !== "") {
2147
+ obj.realmId = message.realmId;
2148
+ }
2149
+ if (message.pageSize !== 0) {
2150
+ obj.pageSize = Math.round(message.pageSize);
2151
+ }
2152
+ if (message.pageToken !== "") {
2153
+ obj.pageToken = message.pageToken;
2154
+ }
2155
+ return obj;
2156
+ },
2157
+ create(base) {
2158
+ return ListApplicationsRequest.fromPartial(base ?? {});
2159
+ },
2160
+ fromPartial(object) {
2161
+ const message = createBaseListApplicationsRequest();
2162
+ message.orgId = object.orgId ?? "";
2163
+ message.realmId = object.realmId ?? "";
2164
+ message.pageSize = object.pageSize ?? 0;
2165
+ message.pageToken = object.pageToken ?? "";
2166
+ return message;
2167
+ },
2168
+ };
2169
+ function createBaseListApplicationsResponse() {
2170
+ return { items: [], nextPageToken: "" };
2171
+ }
2172
+ export const ListApplicationsResponse = {
2173
+ encode(message, writer = new BinaryWriter()) {
2174
+ for (const v of message.items) {
2175
+ Application.encode(v, writer.uint32(10).fork()).join();
2176
+ }
2177
+ if (message.nextPageToken !== "") {
2178
+ writer.uint32(18).string(message.nextPageToken);
2179
+ }
2180
+ return writer;
2181
+ },
2182
+ decode(input, length) {
2183
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2184
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2185
+ if (previousRecursionDepth >= 100) {
2186
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2187
+ }
2188
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2189
+ try {
2190
+ const end = length === undefined ? reader.len : reader.pos + length;
2191
+ const message = createBaseListApplicationsResponse();
2192
+ while (reader.pos < end) {
2193
+ const tag = reader.uint32();
2194
+ switch (tag >>> 3) {
2195
+ case 1: {
2196
+ if (tag !== 10) {
2197
+ break;
2198
+ }
2199
+ message.items.push(Application.decode(reader, reader.uint32()));
2200
+ continue;
2201
+ }
2202
+ case 2: {
2203
+ if (tag !== 18) {
2204
+ break;
2205
+ }
2206
+ message.nextPageToken = reader.string();
2207
+ continue;
2208
+ }
2209
+ }
2210
+ if ((tag & 7) === 4 || tag === 0) {
2211
+ break;
2212
+ }
2213
+ reader.skip(tag & 7);
2214
+ }
2215
+ return message;
2216
+ }
2217
+ finally {
2218
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2219
+ }
2220
+ },
2221
+ fromJSON(object) {
2222
+ return {
2223
+ items: globalThis.Array.isArray(object?.items) ? object.items.map((e) => Application.fromJSON(e)) : [],
2224
+ nextPageToken: isSet(object.nextPageToken)
2225
+ ? globalThis.String(object.nextPageToken)
2226
+ : isSet(object.next_page_token)
2227
+ ? globalThis.String(object.next_page_token)
2228
+ : "",
2229
+ };
2230
+ },
2231
+ toJSON(message) {
2232
+ const obj = {};
2233
+ if (message.items?.length) {
2234
+ obj.items = message.items.map((e) => Application.toJSON(e));
2235
+ }
2236
+ if (message.nextPageToken !== "") {
2237
+ obj.nextPageToken = message.nextPageToken;
2238
+ }
2239
+ return obj;
2240
+ },
2241
+ create(base) {
2242
+ return ListApplicationsResponse.fromPartial(base ?? {});
2243
+ },
2244
+ fromPartial(object) {
2245
+ const message = createBaseListApplicationsResponse();
2246
+ message.items = object.items?.map((e) => Application.fromPartial(e)) || [];
2247
+ message.nextPageToken = object.nextPageToken ?? "";
2248
+ return message;
2249
+ },
2250
+ };
2251
+ export const AccessServiceDefinition = {
2252
+ name: "AccessService",
2253
+ fullName: "tarka.access.v1.AccessService",
2254
+ methods: {
2255
+ createApplication: {
2256
+ name: "CreateApplication",
2257
+ requestType: CreateApplicationRequest,
2258
+ requestStream: false,
2259
+ responseType: Application,
2260
+ responseStream: false,
2261
+ options: {
2262
+ _unknownFields: {
2263
+ 578365826: [
2264
+ Buffer.from([
2265
+ 36,
2266
+ 34,
2267
+ 31,
2268
+ 47,
2269
+ 99,
2270
+ 111,
2271
+ 110,
2272
+ 116,
2273
+ 114,
2274
+ 111,
2275
+ 108,
2276
+ 47,
2277
+ 118,
2278
+ 49,
2279
+ 47,
2280
+ 97,
2281
+ 99,
2282
+ 99,
2283
+ 101,
2284
+ 115,
2285
+ 115,
2286
+ 47,
2287
+ 97,
2288
+ 112,
2289
+ 112,
2290
+ 108,
2291
+ 105,
2292
+ 99,
2293
+ 97,
2294
+ 116,
2295
+ 105,
2296
+ 111,
2297
+ 110,
2298
+ 115,
2299
+ 58,
2300
+ 1,
2301
+ 42,
2302
+ ]),
2303
+ ],
2304
+ },
2305
+ },
2306
+ },
2307
+ updateApplication: {
2308
+ name: "UpdateApplication",
2309
+ requestType: UpdateApplicationRequest,
2310
+ requestStream: false,
2311
+ responseType: Application,
2312
+ responseStream: false,
2313
+ options: {
2314
+ _unknownFields: {
2315
+ 578365826: [
2316
+ Buffer.from([
2317
+ 41,
2318
+ 26,
2319
+ 36,
2320
+ 47,
2321
+ 99,
2322
+ 111,
2323
+ 110,
2324
+ 116,
2325
+ 114,
2326
+ 111,
2327
+ 108,
2328
+ 47,
2329
+ 118,
2330
+ 49,
2331
+ 47,
2332
+ 97,
2333
+ 99,
2334
+ 99,
2335
+ 101,
2336
+ 115,
2337
+ 115,
2338
+ 47,
2339
+ 97,
2340
+ 112,
2341
+ 112,
2342
+ 108,
2343
+ 105,
2344
+ 99,
2345
+ 97,
2346
+ 116,
2347
+ 105,
2348
+ 111,
2349
+ 110,
2350
+ 115,
2351
+ 47,
2352
+ 123,
2353
+ 105,
2354
+ 100,
2355
+ 125,
2356
+ 58,
2357
+ 1,
2358
+ 42,
2359
+ ]),
2360
+ ],
2361
+ },
2362
+ },
2363
+ },
2364
+ getApplication: {
2365
+ name: "GetApplication",
2366
+ requestType: GetApplicationRequest,
2367
+ requestStream: false,
2368
+ responseType: Application,
2369
+ responseStream: false,
2370
+ options: {
2371
+ _unknownFields: {
2372
+ 578365826: [
2373
+ Buffer.from([
2374
+ 38,
2375
+ 18,
2376
+ 36,
2377
+ 47,
2378
+ 99,
2379
+ 111,
2380
+ 110,
2381
+ 116,
2382
+ 114,
2383
+ 111,
2384
+ 108,
2385
+ 47,
2386
+ 118,
2387
+ 49,
2388
+ 47,
2389
+ 97,
2390
+ 99,
2391
+ 99,
2392
+ 101,
2393
+ 115,
2394
+ 115,
2395
+ 47,
2396
+ 97,
2397
+ 112,
2398
+ 112,
2399
+ 108,
2400
+ 105,
2401
+ 99,
2402
+ 97,
2403
+ 116,
2404
+ 105,
2405
+ 111,
2406
+ 110,
2407
+ 115,
2408
+ 47,
2409
+ 123,
2410
+ 105,
2411
+ 100,
2412
+ 125,
2413
+ ]),
2414
+ ],
2415
+ },
2416
+ },
2417
+ },
2418
+ deleteApplication: {
2419
+ name: "DeleteApplication",
2420
+ requestType: DeleteApplicationRequest,
2421
+ requestStream: false,
2422
+ responseType: Empty,
2423
+ responseStream: false,
2424
+ options: {
2425
+ _unknownFields: {
2426
+ 578365826: [
2427
+ Buffer.from([
2428
+ 38,
2429
+ 42,
2430
+ 36,
2431
+ 47,
2432
+ 99,
2433
+ 111,
2434
+ 110,
2435
+ 116,
2436
+ 114,
2437
+ 111,
2438
+ 108,
2439
+ 47,
2440
+ 118,
2441
+ 49,
2442
+ 47,
2443
+ 97,
2444
+ 99,
2445
+ 99,
2446
+ 101,
2447
+ 115,
2448
+ 115,
2449
+ 47,
2450
+ 97,
2451
+ 112,
2452
+ 112,
2453
+ 108,
2454
+ 105,
2455
+ 99,
2456
+ 97,
2457
+ 116,
2458
+ 105,
2459
+ 111,
2460
+ 110,
2461
+ 115,
2462
+ 47,
2463
+ 123,
2464
+ 105,
2465
+ 100,
2466
+ 125,
2467
+ ]),
2468
+ ],
2469
+ },
2470
+ },
2471
+ },
2472
+ listApplications: {
2473
+ name: "ListApplications",
2474
+ requestType: ListApplicationsRequest,
2475
+ requestStream: false,
2476
+ responseType: ListApplicationsResponse,
2477
+ responseStream: false,
2478
+ options: {
2479
+ _unknownFields: {
2480
+ 578365826: [
2481
+ Buffer.from([
2482
+ 33,
2483
+ 18,
2484
+ 31,
2485
+ 47,
2486
+ 99,
2487
+ 111,
2488
+ 110,
2489
+ 116,
2490
+ 114,
2491
+ 111,
2492
+ 108,
2493
+ 47,
2494
+ 118,
2495
+ 49,
2496
+ 47,
2497
+ 97,
2498
+ 99,
2499
+ 99,
2500
+ 101,
2501
+ 115,
2502
+ 115,
2503
+ 47,
2504
+ 97,
2505
+ 112,
2506
+ 112,
2507
+ 108,
2508
+ 105,
2509
+ 99,
2510
+ 97,
2511
+ 116,
2512
+ 105,
2513
+ 111,
2514
+ 110,
2515
+ 115,
2516
+ ]),
2517
+ ],
2518
+ },
2519
+ },
2520
+ },
2521
+ listWorkspaces: {
2522
+ name: "ListWorkspaces",
2523
+ requestType: ListWorkspacesRequest,
2524
+ requestStream: false,
2525
+ responseType: ListWorkspacesResponse,
2526
+ responseStream: false,
2527
+ options: {
2528
+ _unknownFields: {
2529
+ 578365826: [
2530
+ Buffer.from([
2531
+ 61,
2532
+ 18,
2533
+ 59,
2534
+ 47,
2535
+ 99,
2536
+ 111,
2537
+ 110,
2538
+ 116,
2539
+ 114,
2540
+ 111,
2541
+ 108,
2542
+ 47,
2543
+ 118,
2544
+ 49,
2545
+ 47,
2546
+ 97,
2547
+ 99,
2548
+ 99,
2549
+ 101,
2550
+ 115,
2551
+ 115,
2552
+ 47,
2553
+ 97,
2554
+ 112,
2555
+ 112,
2556
+ 108,
2557
+ 105,
2558
+ 99,
2559
+ 97,
2560
+ 116,
2561
+ 105,
2562
+ 111,
2563
+ 110,
2564
+ 115,
2565
+ 47,
2566
+ 123,
2567
+ 97,
2568
+ 112,
2569
+ 112,
2570
+ 108,
2571
+ 105,
2572
+ 99,
2573
+ 97,
2574
+ 116,
2575
+ 105,
2576
+ 111,
2577
+ 110,
2578
+ 95,
2579
+ 105,
2580
+ 100,
2581
+ 125,
2582
+ 47,
2583
+ 119,
2584
+ 111,
2585
+ 114,
2586
+ 107,
2587
+ 115,
2588
+ 112,
2589
+ 97,
2590
+ 99,
2591
+ 101,
2592
+ 115,
2593
+ ]),
2594
+ ],
2595
+ },
2596
+ },
2597
+ },
2598
+ getWorkspace: {
2599
+ name: "GetWorkspace",
2600
+ requestType: GetWorkspaceRequest,
2601
+ requestStream: false,
2602
+ responseType: Workspace,
2603
+ responseStream: false,
2604
+ options: {
2605
+ _unknownFields: {
2606
+ 578365826: [
2607
+ Buffer.from([
2608
+ 66,
2609
+ 18,
2610
+ 64,
2611
+ 47,
2612
+ 99,
2613
+ 111,
2614
+ 110,
2615
+ 116,
2616
+ 114,
2617
+ 111,
2618
+ 108,
2619
+ 47,
2620
+ 118,
2621
+ 49,
2622
+ 47,
2623
+ 97,
2624
+ 99,
2625
+ 99,
2626
+ 101,
2627
+ 115,
2628
+ 115,
2629
+ 47,
2630
+ 97,
2631
+ 112,
2632
+ 112,
2633
+ 108,
2634
+ 105,
2635
+ 99,
2636
+ 97,
2637
+ 116,
2638
+ 105,
2639
+ 111,
2640
+ 110,
2641
+ 115,
2642
+ 47,
2643
+ 123,
2644
+ 97,
2645
+ 112,
2646
+ 112,
2647
+ 108,
2648
+ 105,
2649
+ 99,
2650
+ 97,
2651
+ 116,
2652
+ 105,
2653
+ 111,
2654
+ 110,
2655
+ 95,
2656
+ 105,
2657
+ 100,
2658
+ 125,
2659
+ 47,
2660
+ 119,
2661
+ 111,
2662
+ 114,
2663
+ 107,
2664
+ 115,
2665
+ 112,
2666
+ 97,
2667
+ 99,
2668
+ 101,
2669
+ 115,
2670
+ 47,
2671
+ 123,
2672
+ 105,
2673
+ 100,
2674
+ 125,
2675
+ ]),
2676
+ ],
2677
+ },
2678
+ },
2679
+ },
2680
+ /** Stops compute and withdraws active delegation; retained files are unchanged. */
2681
+ pauseWorkspace: {
2682
+ name: "PauseWorkspace",
2683
+ requestType: PauseWorkspaceRequest,
2684
+ requestStream: false,
2685
+ responseType: Workspace,
2686
+ responseStream: false,
2687
+ options: {
2688
+ _unknownFields: {
2689
+ 578365826: [
2690
+ Buffer.from([
2691
+ 75,
2692
+ 34,
2693
+ 70,
2694
+ 47,
2695
+ 99,
2696
+ 111,
2697
+ 110,
2698
+ 116,
2699
+ 114,
2700
+ 111,
2701
+ 108,
2702
+ 47,
2703
+ 118,
2704
+ 49,
2705
+ 47,
2706
+ 97,
2707
+ 99,
2708
+ 99,
2709
+ 101,
2710
+ 115,
2711
+ 115,
2712
+ 47,
2713
+ 97,
2714
+ 112,
2715
+ 112,
2716
+ 108,
2717
+ 105,
2718
+ 99,
2719
+ 97,
2720
+ 116,
2721
+ 105,
2722
+ 111,
2723
+ 110,
2724
+ 115,
2725
+ 47,
2726
+ 123,
2727
+ 97,
2728
+ 112,
2729
+ 112,
2730
+ 108,
2731
+ 105,
2732
+ 99,
2733
+ 97,
2734
+ 116,
2735
+ 105,
2736
+ 111,
2737
+ 110,
2738
+ 95,
2739
+ 105,
2740
+ 100,
2741
+ 125,
2742
+ 47,
2743
+ 119,
2744
+ 111,
2745
+ 114,
2746
+ 107,
2747
+ 115,
2748
+ 112,
2749
+ 97,
2750
+ 99,
2751
+ 101,
2752
+ 115,
2753
+ 47,
2754
+ 123,
2755
+ 105,
2756
+ 100,
2757
+ 125,
2758
+ 47,
2759
+ 112,
2760
+ 97,
2761
+ 117,
2762
+ 115,
2763
+ 101,
2764
+ 58,
2765
+ 1,
2766
+ 42,
2767
+ ]),
2768
+ ],
2769
+ },
2770
+ },
2771
+ },
2772
+ /**
2773
+ * Rechecks billing and capacity. Resuming cannot create customer consent or
2774
+ * start an agent turn; those still require a live authorized customer session.
2775
+ */
2776
+ resumeWorkspace: {
2777
+ name: "ResumeWorkspace",
2778
+ requestType: ResumeWorkspaceRequest,
2779
+ requestStream: false,
2780
+ responseType: Workspace,
2781
+ responseStream: false,
2782
+ options: {
2783
+ _unknownFields: {
2784
+ 578365826: [
2785
+ Buffer.from([
2786
+ 76,
2787
+ 34,
2788
+ 71,
2789
+ 47,
2790
+ 99,
2791
+ 111,
2792
+ 110,
2793
+ 116,
2794
+ 114,
2795
+ 111,
2796
+ 108,
2797
+ 47,
2798
+ 118,
2799
+ 49,
2800
+ 47,
2801
+ 97,
2802
+ 99,
2803
+ 99,
2804
+ 101,
2805
+ 115,
2806
+ 115,
2807
+ 47,
2808
+ 97,
2809
+ 112,
2810
+ 112,
2811
+ 108,
2812
+ 105,
2813
+ 99,
2814
+ 97,
2815
+ 116,
2816
+ 105,
2817
+ 111,
2818
+ 110,
2819
+ 115,
2820
+ 47,
2821
+ 123,
2822
+ 97,
2823
+ 112,
2824
+ 112,
2825
+ 108,
2826
+ 105,
2827
+ 99,
2828
+ 97,
2829
+ 116,
2830
+ 105,
2831
+ 111,
2832
+ 110,
2833
+ 95,
2834
+ 105,
2835
+ 100,
2836
+ 125,
2837
+ 47,
2838
+ 119,
2839
+ 111,
2840
+ 114,
2841
+ 107,
2842
+ 115,
2843
+ 112,
2844
+ 97,
2845
+ 99,
2846
+ 101,
2847
+ 115,
2848
+ 47,
2849
+ 123,
2850
+ 105,
2851
+ 100,
2852
+ 125,
2853
+ 47,
2854
+ 114,
2855
+ 101,
2856
+ 115,
2857
+ 117,
2858
+ 109,
2859
+ 101,
2860
+ 58,
2861
+ 1,
2862
+ 42,
2863
+ ]),
2864
+ ],
2865
+ },
2866
+ },
2867
+ },
2868
+ /** Permanently removes the workspace and its retained storage asynchronously. */
2869
+ deleteWorkspace: {
2870
+ name: "DeleteWorkspace",
2871
+ requestType: DeleteWorkspaceRequest,
2872
+ requestStream: false,
2873
+ responseType: Empty,
2874
+ responseStream: false,
2875
+ options: {
2876
+ _unknownFields: {
2877
+ 578365826: [
2878
+ Buffer.from([
2879
+ 66,
2880
+ 42,
2881
+ 64,
2882
+ 47,
2883
+ 99,
2884
+ 111,
2885
+ 110,
2886
+ 116,
2887
+ 114,
2888
+ 111,
2889
+ 108,
2890
+ 47,
2891
+ 118,
2892
+ 49,
2893
+ 47,
2894
+ 97,
2895
+ 99,
2896
+ 99,
2897
+ 101,
2898
+ 115,
2899
+ 115,
2900
+ 47,
2901
+ 97,
2902
+ 112,
2903
+ 112,
2904
+ 108,
2905
+ 105,
2906
+ 99,
2907
+ 97,
2908
+ 116,
2909
+ 105,
2910
+ 111,
2911
+ 110,
2912
+ 115,
2913
+ 47,
2914
+ 123,
2915
+ 97,
2916
+ 112,
2917
+ 112,
2918
+ 108,
2919
+ 105,
2920
+ 99,
2921
+ 97,
2922
+ 116,
2923
+ 105,
2924
+ 111,
2925
+ 110,
2926
+ 95,
2927
+ 105,
2928
+ 100,
2929
+ 125,
2930
+ 47,
2931
+ 119,
2932
+ 111,
2933
+ 114,
2934
+ 107,
2935
+ 115,
2936
+ 112,
2937
+ 97,
2938
+ 99,
2939
+ 101,
2940
+ 115,
2941
+ 47,
2942
+ 123,
2943
+ 105,
2944
+ 100,
2945
+ 125,
2946
+ ]),
2947
+ ],
2948
+ },
2949
+ },
2950
+ },
2951
+ },
2952
+ };
2953
+ function toTimestamp(date) {
2954
+ const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
2955
+ const nanos = (date.getTime() % 1_000) * 1_000_000;
2956
+ return { seconds, nanos };
2957
+ }
2958
+ function fromTimestamp(t) {
2959
+ let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1_000;
2960
+ millis += (t.nanos || 0) / 1_000_000;
2961
+ return new globalThis.Date(millis);
2962
+ }
2963
+ function fromJsonTimestamp(o) {
2964
+ if (o instanceof globalThis.Date) {
2965
+ return o;
2966
+ }
2967
+ else if (typeof o === "string") {
2968
+ return new globalThis.Date(o);
2969
+ }
2970
+ else {
2971
+ return fromTimestamp(Timestamp.fromJSON(o));
2972
+ }
2973
+ }
2974
+ function isSet(value) {
2975
+ return value !== null && value !== undefined;
2976
+ }