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