@trycua/cua 0.2.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 (91) hide show
  1. package/README.md +121 -0
  2. package/bin/cua.js +37 -0
  3. package/browser/cua_sdk-ffi.d.ts +6 -0
  4. package/browser/cua_sdk-ffi.js +3 -0
  5. package/browser/cua_sdk-ffi.ts +14 -0
  6. package/browser/cua_sdk.d.ts +2237 -0
  7. package/browser/cua_sdk.js +2607 -0
  8. package/browser/cua_sdk.ts +3644 -0
  9. package/browser/cyclops_sdk_schema-ffi.d.ts +6 -0
  10. package/browser/cyclops_sdk_schema-ffi.js +3 -0
  11. package/browser/cyclops_sdk_schema-ffi.ts +14 -0
  12. package/browser/cyclops_sdk_schema.d.ts +996 -0
  13. package/browser/cyclops_sdk_schema.js +2194 -0
  14. package/browser/cyclops_sdk_schema.ts +2934 -0
  15. package/browser/fleet_sdk-ffi.d.ts +28 -0
  16. package/browser/fleet_sdk-ffi.js +3 -0
  17. package/browser/fleet_sdk-ffi.ts +35 -0
  18. package/browser/fleet_sdk.d.ts +3056 -0
  19. package/browser/fleet_sdk.js +5088 -0
  20. package/browser/fleet_sdk.ts +6830 -0
  21. package/browser/index.d.ts +2 -0
  22. package/browser/index.js +18 -0
  23. package/browser/index.web.ts +34 -0
  24. package/browser/tsconfig.json +20 -0
  25. package/browser/wasm-bindgen/index.d.ts +2346 -0
  26. package/browser/wasm-bindgen/index.js +6642 -0
  27. package/browser/wasm-bindgen/index_bg.wasm +0 -0
  28. package/browser/wasm-bindgen/index_bg.wasm.d.ts +1154 -0
  29. package/dist/index.d.ts +118 -0
  30. package/dist/index.js +207 -0
  31. package/dist/mcp.d.ts +33 -0
  32. package/dist/mcp.js +41 -0
  33. package/dist/native/cua_sdk-ffi.d.ts +1038 -0
  34. package/dist/native/cua_sdk-ffi.js +5095 -0
  35. package/dist/native/cua_sdk.d.ts +15906 -0
  36. package/dist/native/cua_sdk.js +27061 -0
  37. package/dist/native/index.d.ts +7 -0
  38. package/dist/native/index.js +12 -0
  39. package/dist/native/node-runtime.d.ts +72 -0
  40. package/dist/native/node-runtime.js +35 -0
  41. package/dist/spaces/cursorArt.d.ts +27 -0
  42. package/dist/spaces/cursorArt.js +59 -0
  43. package/dist/spaces/errors.d.ts +81 -0
  44. package/dist/spaces/errors.js +102 -0
  45. package/dist/spaces/events.d.ts +154 -0
  46. package/dist/spaces/events.js +182 -0
  47. package/dist/spaces/groups.d.ts +130 -0
  48. package/dist/spaces/groups.js +275 -0
  49. package/dist/spaces/host.d.ts +71 -0
  50. package/dist/spaces/host.js +154 -0
  51. package/dist/spaces/index.d.ts +48 -0
  52. package/dist/spaces/index.js +44 -0
  53. package/dist/spaces/pip.d.ts +128 -0
  54. package/dist/spaces/pip.js +250 -0
  55. package/dist/spaces/presence.d.ts +187 -0
  56. package/dist/spaces/presence.js +449 -0
  57. package/dist/spaces/presenceTypes.check.d.ts +12 -0
  58. package/dist/spaces/presenceTypes.check.js +1 -0
  59. package/dist/spaces/presenceTypes.d.ts +47 -0
  60. package/dist/spaces/presenceTypes.js +7 -0
  61. package/dist/spaces/routines.d.ts +158 -0
  62. package/dist/spaces/routines.js +339 -0
  63. package/dist/spaces/thread.d.ts +147 -0
  64. package/dist/spaces/thread.js +285 -0
  65. package/dist/spaces/transport/http.d.ts +51 -0
  66. package/dist/spaces/transport/http.js +113 -0
  67. package/dist/spaces/transport/index.d.ts +19 -0
  68. package/dist/spaces/transport/index.js +19 -0
  69. package/dist/spaces/transport/session.d.ts +120 -0
  70. package/dist/spaces/transport/session.js +188 -0
  71. package/dist/spaces/transport/tauri.d.ts +50 -0
  72. package/dist/spaces/transport/tauri.js +90 -0
  73. package/dist/spaces/transport/types.d.ts +123 -0
  74. package/dist/spaces/transport/types.js +59 -0
  75. package/dist/teleport/controller.d.ts +34 -0
  76. package/dist/teleport/controller.js +107 -0
  77. package/dist/teleport/drop.d.ts +62 -0
  78. package/dist/teleport/drop.js +138 -0
  79. package/dist/teleport/dropZone.d.ts +59 -0
  80. package/dist/teleport/dropZone.js +166 -0
  81. package/dist/teleport/element.d.ts +28 -0
  82. package/dist/teleport/element.js +340 -0
  83. package/dist/teleport/index.d.ts +32 -0
  84. package/dist/teleport/index.js +32 -0
  85. package/dist/teleport/install.d.ts +31 -0
  86. package/dist/teleport/install.js +65 -0
  87. package/dist/teleport/model.d.ts +245 -0
  88. package/dist/teleport/model.js +334 -0
  89. package/dist/teleport/windowDrag.d.ts +86 -0
  90. package/dist/teleport/windowDrag.js +71 -0
  91. package/package.json +93 -0
@@ -0,0 +1,2934 @@
1
+ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate.
2
+ // Trust me, you don't want to mess with it!
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ // @ts-nocheck
6
+ import * as wasmBundle from "./wasm-bindgen/index.js";
7
+ import { type UniffiRustFutureContinuationCallback, type UniffiForeignFutureDroppedCallback, type UniffiForeignFutureDroppedCallbackStruct,
8
+ } from "./cyclops_sdk_schema-ffi.js";
9
+ import { type FfiConverter, type UniffiByteArray, type UniffiGcObject, type UniffiHandle, type UniffiObjectFactory, AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterBool, FfiConverterInt32, FfiConverterMap, FfiConverterObject, FfiConverterOptional, FfiConverterUInt16, FfiConverterUInt32, FfiConverterUInt8, RustBuffer, UniffiAbstractObject, UniffiEnum, UniffiError, UniffiInternalError, UniffiRustCaller, destructorGuardSymbol, pointerLiteralSymbol, uniffiCreateFfiConverterString, uniffiCreateRecord, uniffiTypeNameSymbol, variantOrdinalSymbol,
10
+ } from "@ubjs/core";
11
+ // wasm1: wrap the wasm-bindgen namespace once so the codegen call sites can
12
+ // uniformly reference `nativeModule().rustbuffer_alloc` / `.rustbuffer_free`.
13
+ // For wasm1, RustBuffers are plain JS Uint8Arrays — no Rust-side allocation
14
+ // is involved, so alloc just hands back a fresh view and free is a no-op.
15
+ const _nativeModule = Object.assign({}, wasmBundle, {
16
+ rustbuffer_alloc: (n: number): Uint8Array => new Uint8Array(n),
17
+ rustbuffer_free: (_: Uint8Array): void => {},
18
+ });
19
+ const nativeModule = () => _nativeModule;
20
+ const uniffiCaller = new UniffiRustCaller(() => new wasmBundle.RustCallStatus());
21
+
22
+ const uniffiIsDebug =
23
+ // @ts-ignore -- The process global might not be defined
24
+ typeof process !== "object" ||
25
+ // @ts-ignore -- The process global might not be defined
26
+ process?.env?.NODE_ENV !== "production" ||
27
+ false;
28
+
29
+ // Public interface members begin here.
30
+
31
+ const stringConverter = (() => {
32
+ const encoder = new TextEncoder();
33
+ const decoder = new TextDecoder();
34
+ return {
35
+ stringToBytes: (s: string) => encoder.encode(s),
36
+ bytesToString: (ab: UniffiByteArray) => decoder.decode(ab),
37
+ stringByteLength: (s: string) => encoder.encode(s).byteLength,
38
+ writeStringIntoBuffer: (s: string, buf: any, offset: number): number => {
39
+ const view = new Uint8Array(
40
+ buf.arrayBuffer,
41
+ offset,
42
+ buf.arrayBuffer.byteLength - offset,
43
+ );
44
+ return encoder.encodeInto(s, view).written;
45
+ },
46
+ readStringFromBuffer: (buf: any, offset: number, length: number): string =>
47
+ decoder.decode(new Uint8Array(buf.arrayBuffer, offset, length)),
48
+ };
49
+ })();
50
+ const FfiConverterString = uniffiCreateFfiConverterString(stringConverter);
51
+
52
+ export type ClaimLifecycle = {
53
+ shutdownTime?: string,
54
+ shutdownPolicy?: string,
55
+ autoRenew?: boolean
56
+ }
57
+
58
+ /**
59
+ * Generated factory for {@link ClaimLifecycle} record objects.
60
+ */
61
+ export const ClaimLifecycle = (() => {
62
+ const defaults = () => ({
63
+ });
64
+ const create = (() => {
65
+ return uniffiCreateRecord<ClaimLifecycle, ReturnType<typeof defaults>>(defaults);
66
+ })();
67
+ return Object.freeze({
68
+ create,
69
+ new: create,
70
+ defaults: () => Object.freeze(defaults()) as Partial<ClaimLifecycle>,
71
+ });
72
+ })();
73
+
74
+ const FfiConverterTypeClaimLifecycle = (() => {
75
+ type TypeName = ClaimLifecycle;
76
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
77
+ read(from: RustBuffer): TypeName {
78
+ return {
79
+ shutdownTime: FfiConverterOptionalString.read(from),
80
+ shutdownPolicy: FfiConverterOptionalString.read(from),
81
+ autoRenew: FfiConverterOptionalBoolean.read(from)
82
+ };
83
+ }
84
+ write(value: TypeName, into: RustBuffer): void {
85
+ FfiConverterOptionalString.write(value.shutdownTime, into);
86
+ FfiConverterOptionalString.write(value.shutdownPolicy, into);
87
+ FfiConverterOptionalBoolean.write(value.autoRenew, into);
88
+ }
89
+ allocationSize(value: TypeName): number {
90
+ return FfiConverterOptionalString.allocationSize(value.shutdownTime) +
91
+ FfiConverterOptionalString.allocationSize(value.shutdownPolicy) +
92
+ FfiConverterOptionalBoolean.allocationSize(value.autoRenew);
93
+
94
+ }
95
+ };
96
+ return new FFIConverter();
97
+ })();
98
+
99
+ /**
100
+ * Reference to a claim-scoped Secret delivered into the bound sandbox. See
101
+ * [`CLAIM_SECRET_NAME_PREFIX`].
102
+ */
103
+ export type ClaimSecretRef = {
104
+ name: string
105
+ }
106
+
107
+ /**
108
+ * Generated factory for {@link ClaimSecretRef} record objects.
109
+ */
110
+ export const ClaimSecretRef = (() => {
111
+ const defaults = () => ({
112
+ });
113
+ const create = (() => {
114
+ return uniffiCreateRecord<ClaimSecretRef, ReturnType<typeof defaults>>(defaults);
115
+ })();
116
+ return Object.freeze({
117
+ create,
118
+ new: create,
119
+ defaults: () => Object.freeze(defaults()) as Partial<ClaimSecretRef>,
120
+ });
121
+ })();
122
+
123
+ const FfiConverterTypeClaimSecretRef = (() => {
124
+ type TypeName = ClaimSecretRef;
125
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
126
+ read(from: RustBuffer): TypeName {
127
+ return {
128
+ name: FfiConverterString.read(from)
129
+ };
130
+ }
131
+ write(value: TypeName, into: RustBuffer): void {
132
+ FfiConverterString.write(value.name, into);
133
+ }
134
+ allocationSize(value: TypeName): number {
135
+ return FfiConverterString.allocationSize(value.name);
136
+
137
+ }
138
+ };
139
+ return new FFIConverter();
140
+ })();
141
+
142
+ export type SandboxTemplateRef = {
143
+ name: string
144
+ }
145
+
146
+ /**
147
+ * Generated factory for {@link SandboxTemplateRef} record objects.
148
+ */
149
+ export const SandboxTemplateRef = (() => {
150
+ const defaults = () => ({
151
+ });
152
+ const create = (() => {
153
+ return uniffiCreateRecord<SandboxTemplateRef, ReturnType<typeof defaults>>(defaults);
154
+ })();
155
+ return Object.freeze({
156
+ create,
157
+ new: create,
158
+ defaults: () => Object.freeze(defaults()) as Partial<SandboxTemplateRef>,
159
+ });
160
+ })();
161
+
162
+ const FfiConverterTypeSandboxTemplateRef = (() => {
163
+ type TypeName = SandboxTemplateRef;
164
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
165
+ read(from: RustBuffer): TypeName {
166
+ return {
167
+ name: FfiConverterString.read(from)
168
+ };
169
+ }
170
+ write(value: TypeName, into: RustBuffer): void {
171
+ FfiConverterString.write(value.name, into);
172
+ }
173
+ allocationSize(value: TypeName): number {
174
+ return FfiConverterString.allocationSize(value.name);
175
+
176
+ }
177
+ };
178
+ return new FFIConverter();
179
+ })();
180
+
181
+ export type ClaimSpec = {
182
+ sandboxTemplateRef: SandboxTemplateRef,
183
+ warmpool?: string,
184
+ bindDeadline?: number,
185
+ lifecycle?: ClaimLifecycle,
186
+ ttlSecondsAfterCreated?: number,
187
+ secretRef?: ClaimSecretRef
188
+ }
189
+
190
+ /**
191
+ * Generated factory for {@link ClaimSpec} record objects.
192
+ */
193
+ export const ClaimSpec = (() => {
194
+ const defaults = () => ({
195
+ ttlSecondsAfterCreated: undefined,
196
+ secretRef: undefined
197
+ });
198
+ const create = (() => {
199
+ return uniffiCreateRecord<ClaimSpec, ReturnType<typeof defaults>>(defaults);
200
+ })();
201
+ return Object.freeze({
202
+ create,
203
+ new: create,
204
+ defaults: () => Object.freeze(defaults()) as Partial<ClaimSpec>,
205
+ });
206
+ })();
207
+
208
+ const FfiConverterTypeClaimSpec = (() => {
209
+ type TypeName = ClaimSpec;
210
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
211
+ read(from: RustBuffer): TypeName {
212
+ return {
213
+ sandboxTemplateRef: FfiConverterTypeSandboxTemplateRef.read(from),
214
+ warmpool: FfiConverterOptionalString.read(from),
215
+ bindDeadline: FfiConverterOptionalUInt32.read(from),
216
+ lifecycle: FfiConverterOptionalTypeClaimLifecycle.read(from),
217
+ ttlSecondsAfterCreated: FfiConverterOptionalUInt32.read(from),
218
+ secretRef: FfiConverterOptionalTypeClaimSecretRef.read(from)
219
+ };
220
+ }
221
+ write(value: TypeName, into: RustBuffer): void {
222
+ FfiConverterTypeSandboxTemplateRef.write(value.sandboxTemplateRef, into);
223
+ FfiConverterOptionalString.write(value.warmpool, into);
224
+ FfiConverterOptionalUInt32.write(value.bindDeadline, into);
225
+ FfiConverterOptionalTypeClaimLifecycle.write(value.lifecycle, into);
226
+ FfiConverterOptionalUInt32.write(value.ttlSecondsAfterCreated, into);
227
+ FfiConverterOptionalTypeClaimSecretRef.write(value.secretRef, into);
228
+ }
229
+ allocationSize(value: TypeName): number {
230
+ return FfiConverterTypeSandboxTemplateRef.allocationSize(value.sandboxTemplateRef) +
231
+ FfiConverterOptionalString.allocationSize(value.warmpool) +
232
+ FfiConverterOptionalUInt32.allocationSize(value.bindDeadline) +
233
+ FfiConverterOptionalTypeClaimLifecycle.allocationSize(value.lifecycle) +
234
+ FfiConverterOptionalUInt32.allocationSize(value.ttlSecondsAfterCreated) +
235
+ FfiConverterOptionalTypeClaimSecretRef.allocationSize(value.secretRef);
236
+
237
+ }
238
+ };
239
+ return new FFIConverter();
240
+ })();
241
+
242
+ export type OsGymSandboxClaimCondition = {
243
+ type?: string,
244
+ status?: string,
245
+ reason?: string,
246
+ message?: string,
247
+ lastTransitionTime?: string
248
+ }
249
+
250
+ /**
251
+ * Generated factory for {@link OsGymSandboxClaimCondition} record objects.
252
+ */
253
+ export const OsGymSandboxClaimCondition = (() => {
254
+ const defaults = () => ({
255
+ });
256
+ const create = (() => {
257
+ return uniffiCreateRecord<OsGymSandboxClaimCondition, ReturnType<typeof defaults>>(defaults);
258
+ })();
259
+ return Object.freeze({
260
+ create,
261
+ new: create,
262
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimCondition>,
263
+ });
264
+ })();
265
+
266
+ const FfiConverterTypeOSGymSandboxClaimCondition = (() => {
267
+ type TypeName = OsGymSandboxClaimCondition;
268
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
269
+ read(from: RustBuffer): TypeName {
270
+ return {
271
+ type: FfiConverterOptionalString.read(from),
272
+ status: FfiConverterOptionalString.read(from),
273
+ reason: FfiConverterOptionalString.read(from),
274
+ message: FfiConverterOptionalString.read(from),
275
+ lastTransitionTime: FfiConverterOptionalString.read(from)
276
+ };
277
+ }
278
+ write(value: TypeName, into: RustBuffer): void {
279
+ FfiConverterOptionalString.write(value.type, into);
280
+ FfiConverterOptionalString.write(value.status, into);
281
+ FfiConverterOptionalString.write(value.reason, into);
282
+ FfiConverterOptionalString.write(value.message, into);
283
+ FfiConverterOptionalString.write(value.lastTransitionTime, into);
284
+ }
285
+ allocationSize(value: TypeName): number {
286
+ return FfiConverterOptionalString.allocationSize(value.type) +
287
+ FfiConverterOptionalString.allocationSize(value.status) +
288
+ FfiConverterOptionalString.allocationSize(value.reason) +
289
+ FfiConverterOptionalString.allocationSize(value.message) +
290
+ FfiConverterOptionalString.allocationSize(value.lastTransitionTime);
291
+
292
+ }
293
+ };
294
+ return new FFIConverter();
295
+ })();
296
+
297
+ export type OsGymSandboxClaimSandbox = {
298
+ name?: string,
299
+ service?: string
300
+ }
301
+
302
+ /**
303
+ * Generated factory for {@link OsGymSandboxClaimSandbox} record objects.
304
+ */
305
+ export const OsGymSandboxClaimSandbox = (() => {
306
+ const defaults = () => ({
307
+ });
308
+ const create = (() => {
309
+ return uniffiCreateRecord<OsGymSandboxClaimSandbox, ReturnType<typeof defaults>>(defaults);
310
+ })();
311
+ return Object.freeze({
312
+ create,
313
+ new: create,
314
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimSandbox>,
315
+ });
316
+ })();
317
+
318
+ const FfiConverterTypeOSGymSandboxClaimSandbox = (() => {
319
+ type TypeName = OsGymSandboxClaimSandbox;
320
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
321
+ read(from: RustBuffer): TypeName {
322
+ return {
323
+ name: FfiConverterOptionalString.read(from),
324
+ service: FfiConverterOptionalString.read(from)
325
+ };
326
+ }
327
+ write(value: TypeName, into: RustBuffer): void {
328
+ FfiConverterOptionalString.write(value.name, into);
329
+ FfiConverterOptionalString.write(value.service, into);
330
+ }
331
+ allocationSize(value: TypeName): number {
332
+ return FfiConverterOptionalString.allocationSize(value.name) +
333
+ FfiConverterOptionalString.allocationSize(value.service);
334
+
335
+ }
336
+ };
337
+ return new FFIConverter();
338
+ })();
339
+
340
+ export type OsGymSandboxClaimStatus = {
341
+ phase?: string,
342
+ conditions?: Array<OsGymSandboxClaimCondition>,
343
+ sandbox?: OsGymSandboxClaimSandbox
344
+ }
345
+
346
+ /**
347
+ * Generated factory for {@link OsGymSandboxClaimStatus} record objects.
348
+ */
349
+ export const OsGymSandboxClaimStatus = (() => {
350
+ const defaults = () => ({
351
+ });
352
+ const create = (() => {
353
+ return uniffiCreateRecord<OsGymSandboxClaimStatus, ReturnType<typeof defaults>>(defaults);
354
+ })();
355
+ return Object.freeze({
356
+ create,
357
+ new: create,
358
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxClaimStatus>,
359
+ });
360
+ })();
361
+
362
+ const FfiConverterTypeOSGymSandboxClaimStatus = (() => {
363
+ type TypeName = OsGymSandboxClaimStatus;
364
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
365
+ read(from: RustBuffer): TypeName {
366
+ return {
367
+ phase: FfiConverterOptionalString.read(from),
368
+ conditions: FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.read(from),
369
+ sandbox: FfiConverterOptionalTypeOSGymSandboxClaimSandbox.read(from)
370
+ };
371
+ }
372
+ write(value: TypeName, into: RustBuffer): void {
373
+ FfiConverterOptionalString.write(value.phase, into);
374
+ FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.write(value.conditions, into);
375
+ FfiConverterOptionalTypeOSGymSandboxClaimSandbox.write(value.sandbox, into);
376
+ }
377
+ allocationSize(value: TypeName): number {
378
+ return FfiConverterOptionalString.allocationSize(value.phase) +
379
+ FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition.allocationSize(value.conditions) +
380
+ FfiConverterOptionalTypeOSGymSandboxClaimSandbox.allocationSize(value.sandbox);
381
+
382
+ }
383
+ };
384
+ return new FFIConverter();
385
+ })();
386
+
387
+ export enum RuntimeKind {
388
+ Kubevirt,
389
+ Macos,
390
+ Gvisor
391
+ }
392
+
393
+ const FfiConverterTypeRuntimeKind = (() => {
394
+ const ordinalConverter = FfiConverterInt32;
395
+ type TypeName = RuntimeKind;
396
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
397
+ read(from: RustBuffer): TypeName {
398
+ switch (ordinalConverter.read(from)) {
399
+ case 1: return RuntimeKind.Kubevirt;
400
+ case 2: return RuntimeKind.Macos;
401
+ case 3: return RuntimeKind.Gvisor;
402
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
403
+ }
404
+ }
405
+ write(value: TypeName, into: RustBuffer): void {
406
+ switch (value) {
407
+ case RuntimeKind.Kubevirt: return ordinalConverter.write(1, into);
408
+ case RuntimeKind.Macos: return ordinalConverter.write(2, into);
409
+ case RuntimeKind.Gvisor: return ordinalConverter.write(3, into);
410
+ }
411
+ }
412
+ allocationSize(value: TypeName): number {
413
+ return ordinalConverter.allocationSize(0);
414
+ }
415
+ }
416
+ return new FFIConverter();
417
+ })();
418
+
419
+ export interface PreservedJsonLike {
420
+
421
+ toJson(): string;
422
+ }
423
+ /**
424
+ * @deprecated Use `PreservedJsonLike` instead.
425
+ */
426
+ export type PreservedJsonInterface = PreservedJsonLike;
427
+
428
+
429
+ export class PreservedJson extends UniffiAbstractObject implements PreservedJsonLike {
430
+
431
+ readonly [uniffiTypeNameSymbol] = "PreservedJson";
432
+ readonly [destructorGuardSymbol]: UniffiGcObject;
433
+ readonly [pointerLiteralSymbol]: UniffiHandle;
434
+ // No primary constructor declared for this class.
435
+ private constructor(pointer: UniffiHandle) {
436
+ super();
437
+ this[pointerLiteralSymbol] = pointer;
438
+ this[destructorGuardSymbol] = uniffiTypePreservedJsonObjectFactory.bless(pointer);
439
+ }
440
+
441
+
442
+ static fromJson(value: string): PreservedJsonLike /*throws*/ {
443
+ return FfiConverterTypePreservedJson.lift(uniffiCaller.rustCallWithError(
444
+ /*liftError:*/ FfiConverterTypeJsonValueError.lift.bind(FfiConverterTypeJsonValueError),
445
+ /*caller:*/ (callStatus) => {
446
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_preservedjson_from_json(
447
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
448
+ callStatus);
449
+ },
450
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
451
+ ));
452
+ }
453
+
454
+
455
+
456
+ toJson(): string {
457
+ return ((__rb: Uint8Array) => {
458
+ try {
459
+ return FfiConverterString.lift(__rb);
460
+ } finally {
461
+ nativeModule().rustbuffer_free(__rb);
462
+ }
463
+ })(uniffiCaller.rustCall(
464
+ /*caller:*/ (callStatus) => {
465
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_preservedjson_to_json(
466
+ uniffiTypePreservedJsonObjectFactory.clonePointer(this),
467
+ callStatus);
468
+ },
469
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
470
+ ));
471
+ }
472
+
473
+
474
+ uniffiDestroy(): void {
475
+ const ptr = (this as any)[destructorGuardSymbol];
476
+ if (ptr !== undefined) {
477
+ const pointer = uniffiTypePreservedJsonObjectFactory.pointer(this);
478
+ uniffiTypePreservedJsonObjectFactory.freePointer(pointer);
479
+ uniffiTypePreservedJsonObjectFactory.unbless(ptr);
480
+ delete (this as any)[destructorGuardSymbol];
481
+ }
482
+ }
483
+
484
+ static instanceOf(obj_: any): obj_ is PreservedJson {
485
+ return uniffiTypePreservedJsonObjectFactory.isConcreteType(obj_);
486
+ }
487
+
488
+
489
+ }
490
+
491
+ const uniffiTypePreservedJsonObjectFactory: UniffiObjectFactory<PreservedJsonLike> = (() => {
492
+
493
+ /// <reference lib="es2021" />
494
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
495
+ uniffiTypePreservedJsonObjectFactory.freePointer(heldValue);
496
+ }) : null;
497
+
498
+ return {
499
+ create(pointer: UniffiHandle): PreservedJsonLike {
500
+ const instance = Object.create(PreservedJson.prototype);
501
+ instance[pointerLiteralSymbol] = pointer;
502
+ instance[destructorGuardSymbol] = this.bless(pointer);
503
+ instance[uniffiTypeNameSymbol] = "PreservedJson";
504
+ return instance;
505
+ },
506
+
507
+
508
+ bless(p: UniffiHandle): UniffiGcObject {
509
+ const ptr = {
510
+ p, // make sure this object doesn't get optimized away.
511
+ markDestroyed: () => undefined,
512
+ };
513
+ if (registry) {
514
+ registry.register(ptr, p, ptr);
515
+ }
516
+ return ptr;
517
+ },
518
+
519
+ unbless(ptr_: UniffiGcObject) {
520
+ if (registry) {
521
+ registry.unregister(ptr_);
522
+ }
523
+ },
524
+
525
+ pointer(obj_: PreservedJsonLike): UniffiHandle {
526
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
527
+ throw new UniffiInternalError.UnexpectedNullPointer();
528
+ }
529
+ return (obj_ as any)[pointerLiteralSymbol];
530
+ },
531
+
532
+ clonePointer(obj_: PreservedJsonLike): UniffiHandle {
533
+ const pointer = this.pointer(obj_);
534
+ return uniffiCaller.rustCall(
535
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_preservedjson(pointer, callStatus),
536
+ /*liftString:*/ FfiConverterString.lift
537
+ );
538
+ },
539
+
540
+ freePointer(pointer: UniffiHandle): void {
541
+ uniffiCaller.rustCall(
542
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_preservedjson(pointer, callStatus),
543
+ /*liftString:*/ FfiConverterString.lift
544
+ );
545
+ },
546
+
547
+ isConcreteType(obj_: any): obj_ is PreservedJsonLike {
548
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "PreservedJson";
549
+ },
550
+ }})();
551
+ const FfiConverterTypePreservedJson = new FfiConverterObject(uniffiTypePreservedJsonObjectFactory);
552
+
553
+ export enum ImagePullPolicy {
554
+ Always,
555
+ IfNotPresent,
556
+ Never
557
+ }
558
+
559
+ const FfiConverterTypeImagePullPolicy = (() => {
560
+ const ordinalConverter = FfiConverterInt32;
561
+ type TypeName = ImagePullPolicy;
562
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
563
+ read(from: RustBuffer): TypeName {
564
+ switch (ordinalConverter.read(from)) {
565
+ case 1: return ImagePullPolicy.Always;
566
+ case 2: return ImagePullPolicy.IfNotPresent;
567
+ case 3: return ImagePullPolicy.Never;
568
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
569
+ }
570
+ }
571
+ write(value: TypeName, into: RustBuffer): void {
572
+ switch (value) {
573
+ case ImagePullPolicy.Always: return ordinalConverter.write(1, into);
574
+ case ImagePullPolicy.IfNotPresent: return ordinalConverter.write(2, into);
575
+ case ImagePullPolicy.Never: return ordinalConverter.write(3, into);
576
+ }
577
+ }
578
+ allocationSize(value: TypeName): number {
579
+ return ordinalConverter.allocationSize(0);
580
+ }
581
+ }
582
+ return new FFIConverter();
583
+ })();
584
+
585
+ export enum Firmware {
586
+ Bios,
587
+ Efi
588
+ }
589
+
590
+ const FfiConverterTypeFirmware = (() => {
591
+ const ordinalConverter = FfiConverterInt32;
592
+ type TypeName = Firmware;
593
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
594
+ read(from: RustBuffer): TypeName {
595
+ switch (ordinalConverter.read(from)) {
596
+ case 1: return Firmware.Bios;
597
+ case 2: return Firmware.Efi;
598
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
599
+ }
600
+ }
601
+ write(value: TypeName, into: RustBuffer): void {
602
+ switch (value) {
603
+ case Firmware.Bios: return ordinalConverter.write(1, into);
604
+ case Firmware.Efi: return ordinalConverter.write(2, into);
605
+ }
606
+ }
607
+ allocationSize(value: TypeName): number {
608
+ return ordinalConverter.allocationSize(0);
609
+ }
610
+ }
611
+ return new FFIConverter();
612
+ })();
613
+
614
+ export enum ServiceProtocol {
615
+ Tcp,
616
+ Udp
617
+ }
618
+
619
+ const FfiConverterTypeServiceProtocol = (() => {
620
+ const ordinalConverter = FfiConverterInt32;
621
+ type TypeName = ServiceProtocol;
622
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
623
+ read(from: RustBuffer): TypeName {
624
+ switch (ordinalConverter.read(from)) {
625
+ case 1: return ServiceProtocol.Tcp;
626
+ case 2: return ServiceProtocol.Udp;
627
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
628
+ }
629
+ }
630
+ write(value: TypeName, into: RustBuffer): void {
631
+ switch (value) {
632
+ case ServiceProtocol.Tcp: return ordinalConverter.write(1, into);
633
+ case ServiceProtocol.Udp: return ordinalConverter.write(2, into);
634
+ }
635
+ }
636
+ allocationSize(value: TypeName): number {
637
+ return ordinalConverter.allocationSize(0);
638
+ }
639
+ }
640
+ return new FFIConverter();
641
+ })();
642
+
643
+ export type SandboxService = {
644
+ name: string,
645
+ targetPort: number,
646
+ protocol?: ServiceProtocol
647
+ }
648
+
649
+ /**
650
+ * Generated factory for {@link SandboxService} record objects.
651
+ */
652
+ export const SandboxService = (() => {
653
+ const defaults = () => ({
654
+ });
655
+ const create = (() => {
656
+ return uniffiCreateRecord<SandboxService, ReturnType<typeof defaults>>(defaults);
657
+ })();
658
+ return Object.freeze({
659
+ create,
660
+ new: create,
661
+ defaults: () => Object.freeze(defaults()) as Partial<SandboxService>,
662
+ });
663
+ })();
664
+
665
+ const FfiConverterTypeSandboxService = (() => {
666
+ type TypeName = SandboxService;
667
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
668
+ read(from: RustBuffer): TypeName {
669
+ return {
670
+ name: FfiConverterString.read(from),
671
+ targetPort: FfiConverterUInt16.read(from),
672
+ protocol: FfiConverterOptionalTypeServiceProtocol.read(from)
673
+ };
674
+ }
675
+ write(value: TypeName, into: RustBuffer): void {
676
+ FfiConverterString.write(value.name, into);
677
+ FfiConverterUInt16.write(value.targetPort, into);
678
+ FfiConverterOptionalTypeServiceProtocol.write(value.protocol, into);
679
+ }
680
+ allocationSize(value: TypeName): number {
681
+ return FfiConverterString.allocationSize(value.name) +
682
+ FfiConverterUInt16.allocationSize(value.targetPort) +
683
+ FfiConverterOptionalTypeServiceProtocol.allocationSize(value.protocol);
684
+
685
+ }
686
+ };
687
+ return new FFIConverter();
688
+ })();
689
+
690
+ export type OidcConfig = {
691
+ credentialsSecret: string,
692
+ tokenUrl: string,
693
+ awsRoleArn?: string,
694
+ awsRegion?: string,
695
+ refreshIntervalSeconds?: number
696
+ }
697
+
698
+ /**
699
+ * Generated factory for {@link OidcConfig} record objects.
700
+ */
701
+ export const OidcConfig = (() => {
702
+ const defaults = () => ({
703
+ });
704
+ const create = (() => {
705
+ return uniffiCreateRecord<OidcConfig, ReturnType<typeof defaults>>(defaults);
706
+ })();
707
+ return Object.freeze({
708
+ create,
709
+ new: create,
710
+ defaults: () => Object.freeze(defaults()) as Partial<OidcConfig>,
711
+ });
712
+ })();
713
+
714
+ const FfiConverterTypeOidcConfig = (() => {
715
+ type TypeName = OidcConfig;
716
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
717
+ read(from: RustBuffer): TypeName {
718
+ return {
719
+ credentialsSecret: FfiConverterString.read(from),
720
+ tokenUrl: FfiConverterString.read(from),
721
+ awsRoleArn: FfiConverterOptionalString.read(from),
722
+ awsRegion: FfiConverterOptionalString.read(from),
723
+ refreshIntervalSeconds: FfiConverterOptionalUInt32.read(from)
724
+ };
725
+ }
726
+ write(value: TypeName, into: RustBuffer): void {
727
+ FfiConverterString.write(value.credentialsSecret, into);
728
+ FfiConverterString.write(value.tokenUrl, into);
729
+ FfiConverterOptionalString.write(value.awsRoleArn, into);
730
+ FfiConverterOptionalString.write(value.awsRegion, into);
731
+ FfiConverterOptionalUInt32.write(value.refreshIntervalSeconds, into);
732
+ }
733
+ allocationSize(value: TypeName): number {
734
+ return FfiConverterString.allocationSize(value.credentialsSecret) +
735
+ FfiConverterString.allocationSize(value.tokenUrl) +
736
+ FfiConverterOptionalString.allocationSize(value.awsRoleArn) +
737
+ FfiConverterOptionalString.allocationSize(value.awsRegion) +
738
+ FfiConverterOptionalUInt32.allocationSize(value.refreshIntervalSeconds);
739
+
740
+ }
741
+ };
742
+ return new FFIConverter();
743
+ })();
744
+
745
+ /**
746
+ * How `vmTemplate.command`/`args`/`env` reach the sandbox
747
+ * (`vmTemplate.processMode`). Absent means `Legacy`.
748
+ */
749
+ export enum ProcessMode {
750
+ /**
751
+ * What templates did before processMode existed: pod runtimes run
752
+ * command/args/env; KubeVirt ignores command and refuses args/env.
753
+ */
754
+ Legacy,
755
+ /**
756
+ * Every runtime runs command/args/env. Pod runtimes set them on the
757
+ * sandbox container; KubeVirt renders them into the sandbox's cloud-init.
758
+ */
759
+ Run
760
+ }
761
+
762
+ const FfiConverterTypeProcessMode = (() => {
763
+ const ordinalConverter = FfiConverterInt32;
764
+ type TypeName = ProcessMode;
765
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
766
+ read(from: RustBuffer): TypeName {
767
+ switch (ordinalConverter.read(from)) {
768
+ case 1: return ProcessMode.Legacy;
769
+ case 2: return ProcessMode.Run;
770
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
771
+ }
772
+ }
773
+ write(value: TypeName, into: RustBuffer): void {
774
+ switch (value) {
775
+ case ProcessMode.Legacy: return ordinalConverter.write(1, into);
776
+ case ProcessMode.Run: return ordinalConverter.write(2, into);
777
+ }
778
+ }
779
+ allocationSize(value: TypeName): number {
780
+ return ordinalConverter.allocationSize(0);
781
+ }
782
+ }
783
+ return new FFIConverter();
784
+ })();
785
+
786
+ export type VmTemplate = {
787
+ containerDiskImage: string,
788
+ command?: Array<string>,
789
+ runtime?: RuntimeKind,
790
+ runtimeClassName?: string,
791
+ nodeSelector?: Map<string, string>,
792
+ tolerations?: Array<PreservedJsonLike>,
793
+ imagePullPolicy?: ImagePullPolicy,
794
+ imagePullSecret?: string,
795
+ cpuCores?: number,
796
+ memory?: string,
797
+ firmware?: Firmware,
798
+ nestedVirtualization?: boolean,
799
+ probes?: PreservedJsonLike,
800
+ services?: Array<SandboxService>,
801
+ oidc?: OidcConfig,
802
+ claimSecrets?: boolean,
803
+ args?: Array<string>,
804
+ env?: Map<string, string>,
805
+ processMode?: ProcessMode
806
+ }
807
+
808
+ /**
809
+ * Generated factory for {@link VmTemplate} record objects.
810
+ */
811
+ export const VmTemplate = (() => {
812
+ const defaults = () => ({
813
+ claimSecrets: undefined,
814
+ args: undefined,
815
+ env: undefined,
816
+ processMode: undefined
817
+ });
818
+ const create = (() => {
819
+ return uniffiCreateRecord<VmTemplate, ReturnType<typeof defaults>>(defaults);
820
+ })();
821
+ return Object.freeze({
822
+ create,
823
+ new: create,
824
+ defaults: () => Object.freeze(defaults()) as Partial<VmTemplate>,
825
+ });
826
+ })();
827
+
828
+ const FfiConverterTypeVmTemplate = (() => {
829
+ type TypeName = VmTemplate;
830
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
831
+ read(from: RustBuffer): TypeName {
832
+ return {
833
+ containerDiskImage: FfiConverterString.read(from),
834
+ command: FfiConverterOptionalSequenceString.read(from),
835
+ runtime: FfiConverterOptionalTypeRuntimeKind.read(from),
836
+ runtimeClassName: FfiConverterOptionalString.read(from),
837
+ nodeSelector: FfiConverterOptionalMapStringString.read(from),
838
+ tolerations: FfiConverterOptionalSequenceTypePreservedJson.read(from),
839
+ imagePullPolicy: FfiConverterOptionalTypeImagePullPolicy.read(from),
840
+ imagePullSecret: FfiConverterOptionalString.read(from),
841
+ cpuCores: FfiConverterOptionalUInt32.read(from),
842
+ memory: FfiConverterOptionalString.read(from),
843
+ firmware: FfiConverterOptionalTypeFirmware.read(from),
844
+ nestedVirtualization: FfiConverterOptionalBoolean.read(from),
845
+ probes: FfiConverterOptionalTypePreservedJson.read(from),
846
+ services: FfiConverterOptionalSequenceTypeSandboxService.read(from),
847
+ oidc: FfiConverterOptionalTypeOidcConfig.read(from),
848
+ claimSecrets: FfiConverterOptionalBoolean.read(from),
849
+ args: FfiConverterOptionalSequenceString.read(from),
850
+ env: FfiConverterOptionalMapStringString.read(from),
851
+ processMode: FfiConverterOptionalTypeProcessMode.read(from)
852
+ };
853
+ }
854
+ write(value: TypeName, into: RustBuffer): void {
855
+ FfiConverterString.write(value.containerDiskImage, into);
856
+ FfiConverterOptionalSequenceString.write(value.command, into);
857
+ FfiConverterOptionalTypeRuntimeKind.write(value.runtime, into);
858
+ FfiConverterOptionalString.write(value.runtimeClassName, into);
859
+ FfiConverterOptionalMapStringString.write(value.nodeSelector, into);
860
+ FfiConverterOptionalSequenceTypePreservedJson.write(value.tolerations, into);
861
+ FfiConverterOptionalTypeImagePullPolicy.write(value.imagePullPolicy, into);
862
+ FfiConverterOptionalString.write(value.imagePullSecret, into);
863
+ FfiConverterOptionalUInt32.write(value.cpuCores, into);
864
+ FfiConverterOptionalString.write(value.memory, into);
865
+ FfiConverterOptionalTypeFirmware.write(value.firmware, into);
866
+ FfiConverterOptionalBoolean.write(value.nestedVirtualization, into);
867
+ FfiConverterOptionalTypePreservedJson.write(value.probes, into);
868
+ FfiConverterOptionalSequenceTypeSandboxService.write(value.services, into);
869
+ FfiConverterOptionalTypeOidcConfig.write(value.oidc, into);
870
+ FfiConverterOptionalBoolean.write(value.claimSecrets, into);
871
+ FfiConverterOptionalSequenceString.write(value.args, into);
872
+ FfiConverterOptionalMapStringString.write(value.env, into);
873
+ FfiConverterOptionalTypeProcessMode.write(value.processMode, into);
874
+ }
875
+ allocationSize(value: TypeName): number {
876
+ return FfiConverterString.allocationSize(value.containerDiskImage) +
877
+ FfiConverterOptionalSequenceString.allocationSize(value.command) +
878
+ FfiConverterOptionalTypeRuntimeKind.allocationSize(value.runtime) +
879
+ FfiConverterOptionalString.allocationSize(value.runtimeClassName) +
880
+ FfiConverterOptionalMapStringString.allocationSize(value.nodeSelector) +
881
+ FfiConverterOptionalSequenceTypePreservedJson.allocationSize(value.tolerations) +
882
+ FfiConverterOptionalTypeImagePullPolicy.allocationSize(value.imagePullPolicy) +
883
+ FfiConverterOptionalString.allocationSize(value.imagePullSecret) +
884
+ FfiConverterOptionalUInt32.allocationSize(value.cpuCores) +
885
+ FfiConverterOptionalString.allocationSize(value.memory) +
886
+ FfiConverterOptionalTypeFirmware.allocationSize(value.firmware) +
887
+ FfiConverterOptionalBoolean.allocationSize(value.nestedVirtualization) +
888
+ FfiConverterOptionalTypePreservedJson.allocationSize(value.probes) +
889
+ FfiConverterOptionalSequenceTypeSandboxService.allocationSize(value.services) +
890
+ FfiConverterOptionalTypeOidcConfig.allocationSize(value.oidc) +
891
+ FfiConverterOptionalBoolean.allocationSize(value.claimSecrets) +
892
+ FfiConverterOptionalSequenceString.allocationSize(value.args) +
893
+ FfiConverterOptionalMapStringString.allocationSize(value.env) +
894
+ FfiConverterOptionalTypeProcessMode.allocationSize(value.processMode);
895
+
896
+ }
897
+ };
898
+ return new FFIConverter();
899
+ })();
900
+
901
+ export type OsGymSandboxSpec = {
902
+ vmTemplate: VmTemplate
903
+ }
904
+
905
+ /**
906
+ * Generated factory for {@link OsGymSandboxSpec} record objects.
907
+ */
908
+ export const OsGymSandboxSpec = (() => {
909
+ const defaults = () => ({
910
+ });
911
+ const create = (() => {
912
+ return uniffiCreateRecord<OsGymSandboxSpec, ReturnType<typeof defaults>>(defaults);
913
+ })();
914
+ return Object.freeze({
915
+ create,
916
+ new: create,
917
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxSpec>,
918
+ });
919
+ })();
920
+
921
+ const FfiConverterTypeOSGymSandboxSpec = (() => {
922
+ type TypeName = OsGymSandboxSpec;
923
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
924
+ read(from: RustBuffer): TypeName {
925
+ return {
926
+ vmTemplate: FfiConverterTypeVmTemplate.read(from)
927
+ };
928
+ }
929
+ write(value: TypeName, into: RustBuffer): void {
930
+ FfiConverterTypeVmTemplate.write(value.vmTemplate, into);
931
+ }
932
+ allocationSize(value: TypeName): number {
933
+ return FfiConverterTypeVmTemplate.allocationSize(value.vmTemplate);
934
+
935
+ }
936
+ };
937
+ return new FFIConverter();
938
+ })();
939
+
940
+ export type OsGymSandboxStatus = {
941
+ phase?: string,
942
+ runtime?: string,
943
+ ready?: boolean,
944
+ vmName?: string,
945
+ service?: string,
946
+ message?: string,
947
+ resetIssuedAt?: string,
948
+ resetVmiUid?: string
949
+ }
950
+
951
+ /**
952
+ * Generated factory for {@link OsGymSandboxStatus} record objects.
953
+ */
954
+ export const OsGymSandboxStatus = (() => {
955
+ const defaults = () => ({
956
+ });
957
+ const create = (() => {
958
+ return uniffiCreateRecord<OsGymSandboxStatus, ReturnType<typeof defaults>>(defaults);
959
+ })();
960
+ return Object.freeze({
961
+ create,
962
+ new: create,
963
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxStatus>,
964
+ });
965
+ })();
966
+
967
+ const FfiConverterTypeOSGymSandboxStatus = (() => {
968
+ type TypeName = OsGymSandboxStatus;
969
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
970
+ read(from: RustBuffer): TypeName {
971
+ return {
972
+ phase: FfiConverterOptionalString.read(from),
973
+ runtime: FfiConverterOptionalString.read(from),
974
+ ready: FfiConverterOptionalBoolean.read(from),
975
+ vmName: FfiConverterOptionalString.read(from),
976
+ service: FfiConverterOptionalString.read(from),
977
+ message: FfiConverterOptionalString.read(from),
978
+ resetIssuedAt: FfiConverterOptionalString.read(from),
979
+ resetVmiUid: FfiConverterOptionalString.read(from)
980
+ };
981
+ }
982
+ write(value: TypeName, into: RustBuffer): void {
983
+ FfiConverterOptionalString.write(value.phase, into);
984
+ FfiConverterOptionalString.write(value.runtime, into);
985
+ FfiConverterOptionalBoolean.write(value.ready, into);
986
+ FfiConverterOptionalString.write(value.vmName, into);
987
+ FfiConverterOptionalString.write(value.service, into);
988
+ FfiConverterOptionalString.write(value.message, into);
989
+ FfiConverterOptionalString.write(value.resetIssuedAt, into);
990
+ FfiConverterOptionalString.write(value.resetVmiUid, into);
991
+ }
992
+ allocationSize(value: TypeName): number {
993
+ return FfiConverterOptionalString.allocationSize(value.phase) +
994
+ FfiConverterOptionalString.allocationSize(value.runtime) +
995
+ FfiConverterOptionalBoolean.allocationSize(value.ready) +
996
+ FfiConverterOptionalString.allocationSize(value.vmName) +
997
+ FfiConverterOptionalString.allocationSize(value.service) +
998
+ FfiConverterOptionalString.allocationSize(value.message) +
999
+ FfiConverterOptionalString.allocationSize(value.resetIssuedAt) +
1000
+ FfiConverterOptionalString.allocationSize(value.resetVmiUid);
1001
+
1002
+ }
1003
+ };
1004
+ return new FFIConverter();
1005
+ })();
1006
+
1007
+ export type OsGymSandboxTemplateSpec = {
1008
+ vmTemplate: VmTemplate
1009
+ }
1010
+
1011
+ /**
1012
+ * Generated factory for {@link OsGymSandboxTemplateSpec} record objects.
1013
+ */
1014
+ export const OsGymSandboxTemplateSpec = (() => {
1015
+ const defaults = () => ({
1016
+ });
1017
+ const create = (() => {
1018
+ return uniffiCreateRecord<OsGymSandboxTemplateSpec, ReturnType<typeof defaults>>(defaults);
1019
+ })();
1020
+ return Object.freeze({
1021
+ create,
1022
+ new: create,
1023
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxTemplateSpec>,
1024
+ });
1025
+ })();
1026
+
1027
+ const FfiConverterTypeOSGymSandboxTemplateSpec = (() => {
1028
+ type TypeName = OsGymSandboxTemplateSpec;
1029
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1030
+ read(from: RustBuffer): TypeName {
1031
+ return {
1032
+ vmTemplate: FfiConverterTypeVmTemplate.read(from)
1033
+ };
1034
+ }
1035
+ write(value: TypeName, into: RustBuffer): void {
1036
+ FfiConverterTypeVmTemplate.write(value.vmTemplate, into);
1037
+ }
1038
+ allocationSize(value: TypeName): number {
1039
+ return FfiConverterTypeVmTemplate.allocationSize(value.vmTemplate);
1040
+
1041
+ }
1042
+ };
1043
+ return new FFIConverter();
1044
+ })();
1045
+
1046
+ export type WarmPoolAutoscaling = {
1047
+ minPoolSize?: number,
1048
+ initialPoolSize?: number,
1049
+ maxPoolSize?: number
1050
+ }
1051
+
1052
+ /**
1053
+ * Generated factory for {@link WarmPoolAutoscaling} record objects.
1054
+ */
1055
+ export const WarmPoolAutoscaling = (() => {
1056
+ const defaults = () => ({
1057
+ });
1058
+ const create = (() => {
1059
+ return uniffiCreateRecord<WarmPoolAutoscaling, ReturnType<typeof defaults>>(defaults);
1060
+ })();
1061
+ return Object.freeze({
1062
+ create,
1063
+ new: create,
1064
+ defaults: () => Object.freeze(defaults()) as Partial<WarmPoolAutoscaling>,
1065
+ });
1066
+ })();
1067
+
1068
+ const FfiConverterTypeWarmPoolAutoscaling = (() => {
1069
+ type TypeName = WarmPoolAutoscaling;
1070
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1071
+ read(from: RustBuffer): TypeName {
1072
+ return {
1073
+ minPoolSize: FfiConverterOptionalUInt32.read(from),
1074
+ initialPoolSize: FfiConverterOptionalUInt32.read(from),
1075
+ maxPoolSize: FfiConverterOptionalUInt32.read(from)
1076
+ };
1077
+ }
1078
+ write(value: TypeName, into: RustBuffer): void {
1079
+ FfiConverterOptionalUInt32.write(value.minPoolSize, into);
1080
+ FfiConverterOptionalUInt32.write(value.initialPoolSize, into);
1081
+ FfiConverterOptionalUInt32.write(value.maxPoolSize, into);
1082
+ }
1083
+ allocationSize(value: TypeName): number {
1084
+ return FfiConverterOptionalUInt32.allocationSize(value.minPoolSize) +
1085
+ FfiConverterOptionalUInt32.allocationSize(value.initialPoolSize) +
1086
+ FfiConverterOptionalUInt32.allocationSize(value.maxPoolSize);
1087
+
1088
+ }
1089
+ };
1090
+ return new FFIConverter();
1091
+ })();
1092
+
1093
+ /**
1094
+ * What the pool-operator deletes when a warm pool's creation TTL
1095
+ * (`ttlSecondsAfterCreated`) or idle TTL (`idleTtlSeconds`) expires.
1096
+ */
1097
+ export enum WarmPoolTtlPolicy {
1098
+ /**
1099
+ * Delete only the warm pool. Its claims and namespace stay.
1100
+ */
1101
+ Retain,
1102
+ /**
1103
+ * Also delete the pool's dead unbound claims (TTL passed, older than
1104
+ * max(900s, bindDeadline)). Bound claims, the namespace and volumes stay.
1105
+ */
1106
+ Cascade
1107
+ }
1108
+
1109
+ const FfiConverterTypeWarmPoolTtlPolicy = (() => {
1110
+ const ordinalConverter = FfiConverterInt32;
1111
+ type TypeName = WarmPoolTtlPolicy;
1112
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1113
+ read(from: RustBuffer): TypeName {
1114
+ switch (ordinalConverter.read(from)) {
1115
+ case 1: return WarmPoolTtlPolicy.Retain;
1116
+ case 2: return WarmPoolTtlPolicy.Cascade;
1117
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1118
+ }
1119
+ }
1120
+ write(value: TypeName, into: RustBuffer): void {
1121
+ switch (value) {
1122
+ case WarmPoolTtlPolicy.Retain: return ordinalConverter.write(1, into);
1123
+ case WarmPoolTtlPolicy.Cascade: return ordinalConverter.write(2, into);
1124
+ }
1125
+ }
1126
+ allocationSize(value: TypeName): number {
1127
+ return ordinalConverter.allocationSize(0);
1128
+ }
1129
+ }
1130
+ return new FFIConverter();
1131
+ })();
1132
+
1133
+ export type OsGymSandboxWarmPoolSpec = {
1134
+ replicas: number,
1135
+ sandboxTemplateRef: SandboxTemplateRef,
1136
+ autoscaling?: WarmPoolAutoscaling,
1137
+ ttlSecondsAfterCreated?: number,
1138
+ idleTtlSeconds?: number,
1139
+ ttlPolicy?: WarmPoolTtlPolicy
1140
+ }
1141
+
1142
+ /**
1143
+ * Generated factory for {@link OsGymSandboxWarmPoolSpec} record objects.
1144
+ */
1145
+ export const OsGymSandboxWarmPoolSpec = (() => {
1146
+ const defaults = () => ({
1147
+ ttlSecondsAfterCreated: undefined,
1148
+ idleTtlSeconds: undefined,
1149
+ ttlPolicy: undefined
1150
+ });
1151
+ const create = (() => {
1152
+ return uniffiCreateRecord<OsGymSandboxWarmPoolSpec, ReturnType<typeof defaults>>(defaults);
1153
+ })();
1154
+ return Object.freeze({
1155
+ create,
1156
+ new: create,
1157
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxWarmPoolSpec>,
1158
+ });
1159
+ })();
1160
+
1161
+ const FfiConverterTypeOSGymSandboxWarmPoolSpec = (() => {
1162
+ type TypeName = OsGymSandboxWarmPoolSpec;
1163
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1164
+ read(from: RustBuffer): TypeName {
1165
+ return {
1166
+ replicas: FfiConverterUInt32.read(from),
1167
+ sandboxTemplateRef: FfiConverterTypeSandboxTemplateRef.read(from),
1168
+ autoscaling: FfiConverterOptionalTypeWarmPoolAutoscaling.read(from),
1169
+ ttlSecondsAfterCreated: FfiConverterOptionalUInt32.read(from),
1170
+ idleTtlSeconds: FfiConverterOptionalUInt32.read(from),
1171
+ ttlPolicy: FfiConverterOptionalTypeWarmPoolTtlPolicy.read(from)
1172
+ };
1173
+ }
1174
+ write(value: TypeName, into: RustBuffer): void {
1175
+ FfiConverterUInt32.write(value.replicas, into);
1176
+ FfiConverterTypeSandboxTemplateRef.write(value.sandboxTemplateRef, into);
1177
+ FfiConverterOptionalTypeWarmPoolAutoscaling.write(value.autoscaling, into);
1178
+ FfiConverterOptionalUInt32.write(value.ttlSecondsAfterCreated, into);
1179
+ FfiConverterOptionalUInt32.write(value.idleTtlSeconds, into);
1180
+ FfiConverterOptionalTypeWarmPoolTtlPolicy.write(value.ttlPolicy, into);
1181
+ }
1182
+ allocationSize(value: TypeName): number {
1183
+ return FfiConverterUInt32.allocationSize(value.replicas) +
1184
+ FfiConverterTypeSandboxTemplateRef.allocationSize(value.sandboxTemplateRef) +
1185
+ FfiConverterOptionalTypeWarmPoolAutoscaling.allocationSize(value.autoscaling) +
1186
+ FfiConverterOptionalUInt32.allocationSize(value.ttlSecondsAfterCreated) +
1187
+ FfiConverterOptionalUInt32.allocationSize(value.idleTtlSeconds) +
1188
+ FfiConverterOptionalTypeWarmPoolTtlPolicy.allocationSize(value.ttlPolicy);
1189
+
1190
+ }
1191
+ };
1192
+ return new FFIConverter();
1193
+ })();
1194
+
1195
+ export type OsGymSandboxWarmPoolStatus = {
1196
+ replicas?: number,
1197
+ readyReplicas?: number,
1198
+ selector?: string,
1199
+ lastClaimedAt?: string,
1200
+ lastActivityTime?: string
1201
+ }
1202
+
1203
+ /**
1204
+ * Generated factory for {@link OsGymSandboxWarmPoolStatus} record objects.
1205
+ */
1206
+ export const OsGymSandboxWarmPoolStatus = (() => {
1207
+ const defaults = () => ({
1208
+ lastClaimedAt: undefined,
1209
+ lastActivityTime: undefined
1210
+ });
1211
+ const create = (() => {
1212
+ return uniffiCreateRecord<OsGymSandboxWarmPoolStatus, ReturnType<typeof defaults>>(defaults);
1213
+ })();
1214
+ return Object.freeze({
1215
+ create,
1216
+ new: create,
1217
+ defaults: () => Object.freeze(defaults()) as Partial<OsGymSandboxWarmPoolStatus>,
1218
+ });
1219
+ })();
1220
+
1221
+ const FfiConverterTypeOSGymSandboxWarmPoolStatus = (() => {
1222
+ type TypeName = OsGymSandboxWarmPoolStatus;
1223
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1224
+ read(from: RustBuffer): TypeName {
1225
+ return {
1226
+ replicas: FfiConverterOptionalUInt32.read(from),
1227
+ readyReplicas: FfiConverterOptionalUInt32.read(from),
1228
+ selector: FfiConverterOptionalString.read(from),
1229
+ lastClaimedAt: FfiConverterOptionalString.read(from),
1230
+ lastActivityTime: FfiConverterOptionalString.read(from)
1231
+ };
1232
+ }
1233
+ write(value: TypeName, into: RustBuffer): void {
1234
+ FfiConverterOptionalUInt32.write(value.replicas, into);
1235
+ FfiConverterOptionalUInt32.write(value.readyReplicas, into);
1236
+ FfiConverterOptionalString.write(value.selector, into);
1237
+ FfiConverterOptionalString.write(value.lastClaimedAt, into);
1238
+ FfiConverterOptionalString.write(value.lastActivityTime, into);
1239
+ }
1240
+ allocationSize(value: TypeName): number {
1241
+ return FfiConverterOptionalUInt32.allocationSize(value.replicas) +
1242
+ FfiConverterOptionalUInt32.allocationSize(value.readyReplicas) +
1243
+ FfiConverterOptionalString.allocationSize(value.selector) +
1244
+ FfiConverterOptionalString.allocationSize(value.lastClaimedAt) +
1245
+ FfiConverterOptionalString.allocationSize(value.lastActivityTime);
1246
+
1247
+ }
1248
+ };
1249
+ return new FFIConverter();
1250
+ })();
1251
+
1252
+
1253
+ // Error type: JsonValueError
1254
+ export enum JsonValueError_Tags {
1255
+ Invalid = "Invalid"
1256
+ }
1257
+ export const JsonValueError = (() => {
1258
+
1259
+ type Invalid__interface = {
1260
+ tag: JsonValueError_Tags.Invalid;
1261
+ inner:
1262
+ Readonly<{reason: string}>
1263
+ };
1264
+ class Invalid_ extends UniffiError implements Invalid__interface {
1265
+ /**
1266
+ * @private
1267
+ * This field is private and should not be used, use `tag` instead.
1268
+ */
1269
+ readonly [uniffiTypeNameSymbol] = "JsonValueError";
1270
+ readonly tag = JsonValueError_Tags.Invalid;
1271
+ readonly inner:
1272
+ Readonly<{reason: string}>;
1273
+ constructor(
1274
+ inner: {reason: string }) {
1275
+ super("JsonValueError", "Invalid");
1276
+
1277
+ this.inner = Object.freeze(inner);
1278
+ }
1279
+ static new(
1280
+ inner: {reason: string }): Invalid_ {
1281
+ return new Invalid_(inner);
1282
+ }
1283
+
1284
+ static instanceOf(obj: any): obj is Invalid_ {
1285
+ return obj.tag === JsonValueError_Tags.Invalid;
1286
+ }
1287
+ static hasInner(obj: any): obj is Invalid_ {
1288
+ return Invalid_.instanceOf(obj);
1289
+ }
1290
+
1291
+ static getInner(obj: Invalid_):
1292
+ Readonly<{reason: string}> {
1293
+ return obj.inner;
1294
+ }
1295
+
1296
+ }
1297
+
1298
+ function instanceOf(obj: any): obj is JsonValueError {
1299
+ return obj[uniffiTypeNameSymbol] === "JsonValueError";
1300
+ }
1301
+
1302
+ return Object.freeze({
1303
+ instanceOf,
1304
+ Invalid: Invalid_
1305
+ });
1306
+
1307
+ })();
1308
+ export type JsonValueError = InstanceType<
1309
+ typeof JsonValueError['Invalid']
1310
+ >;
1311
+
1312
+ // FfiConverter for enum JsonValueError
1313
+ const FfiConverterTypeJsonValueError = (() => {
1314
+ const ordinalConverter = FfiConverterInt32;
1315
+ type TypeName = JsonValueError;
1316
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1317
+ read(from: RustBuffer): TypeName {
1318
+ switch (ordinalConverter.read(from)) {
1319
+ case 1: return new JsonValueError.Invalid({reason: FfiConverterString.read(from) });
1320
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1321
+ }
1322
+ }
1323
+ write(value: TypeName, into: RustBuffer): void {
1324
+ switch (value.tag) {
1325
+ case JsonValueError_Tags.Invalid: {
1326
+ ordinalConverter.write(1, into);
1327
+ const inner = value.inner;
1328
+ FfiConverterString.write(inner.reason, into);
1329
+ return;
1330
+ }
1331
+ default:
1332
+ // Throwing from here means that JsonValueError_Tags hasn't matched an ordinal.
1333
+ throw new UniffiInternalError.UnexpectedEnumCase();
1334
+ }
1335
+ }
1336
+ allocationSize(value: TypeName): number {
1337
+ switch (value.tag) {
1338
+ case JsonValueError_Tags.Invalid: {
1339
+ const inner = value.inner;
1340
+ let size = ordinalConverter.allocationSize(1);
1341
+ size += FfiConverterString.allocationSize(inner.reason);
1342
+ return size;
1343
+ }
1344
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1345
+ }
1346
+ }
1347
+ }
1348
+ return new FFIConverter();
1349
+ })();
1350
+
1351
+
1352
+ // Error type: SchemaBuildError
1353
+ export enum SchemaBuildError_Tags {
1354
+ MissingRequiredField = "MissingRequiredField"
1355
+ }
1356
+ export const SchemaBuildError = (() => {
1357
+
1358
+ type MissingRequiredField__interface = {
1359
+ tag: SchemaBuildError_Tags.MissingRequiredField;
1360
+ inner:
1361
+ Readonly<{recordType: string; field: string}>
1362
+ };
1363
+ class MissingRequiredField_ extends UniffiError implements MissingRequiredField__interface {
1364
+ /**
1365
+ * @private
1366
+ * This field is private and should not be used, use `tag` instead.
1367
+ */
1368
+ readonly [uniffiTypeNameSymbol] = "SchemaBuildError";
1369
+ readonly tag = SchemaBuildError_Tags.MissingRequiredField;
1370
+ readonly inner:
1371
+ Readonly<{recordType: string; field: string}>;
1372
+ constructor(
1373
+ inner: {recordType: string; field: string }) {
1374
+ super("SchemaBuildError", "MissingRequiredField");
1375
+
1376
+ this.inner = Object.freeze(inner);
1377
+ }
1378
+ static new(
1379
+ inner: {recordType: string; field: string }): MissingRequiredField_ {
1380
+ return new MissingRequiredField_(inner);
1381
+ }
1382
+
1383
+ static instanceOf(obj: any): obj is MissingRequiredField_ {
1384
+ return obj.tag === SchemaBuildError_Tags.MissingRequiredField;
1385
+ }
1386
+ static hasInner(obj: any): obj is MissingRequiredField_ {
1387
+ return MissingRequiredField_.instanceOf(obj);
1388
+ }
1389
+
1390
+ static getInner(obj: MissingRequiredField_):
1391
+ Readonly<{recordType: string; field: string}> {
1392
+ return obj.inner;
1393
+ }
1394
+
1395
+ }
1396
+
1397
+ function instanceOf(obj: any): obj is SchemaBuildError {
1398
+ return obj[uniffiTypeNameSymbol] === "SchemaBuildError";
1399
+ }
1400
+
1401
+ return Object.freeze({
1402
+ instanceOf,
1403
+ MissingRequiredField: MissingRequiredField_
1404
+ });
1405
+
1406
+ })();
1407
+ export type SchemaBuildError = InstanceType<
1408
+ typeof SchemaBuildError['MissingRequiredField']
1409
+ >;
1410
+
1411
+ // FfiConverter for enum SchemaBuildError
1412
+ const FfiConverterTypeSchemaBuildError = (() => {
1413
+ const ordinalConverter = FfiConverterInt32;
1414
+ type TypeName = SchemaBuildError;
1415
+ class FFIConverter extends AbstractFfiConverterByteArray<TypeName> {
1416
+ read(from: RustBuffer): TypeName {
1417
+ switch (ordinalConverter.read(from)) {
1418
+ case 1: return new SchemaBuildError.MissingRequiredField({recordType: FfiConverterString.read(from), field: FfiConverterString.read(from) });
1419
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1420
+ }
1421
+ }
1422
+ write(value: TypeName, into: RustBuffer): void {
1423
+ switch (value.tag) {
1424
+ case SchemaBuildError_Tags.MissingRequiredField: {
1425
+ ordinalConverter.write(1, into);
1426
+ const inner = value.inner;
1427
+ FfiConverterString.write(inner.recordType, into);
1428
+ FfiConverterString.write(inner.field, into);
1429
+ return;
1430
+ }
1431
+ default:
1432
+ // Throwing from here means that SchemaBuildError_Tags hasn't matched an ordinal.
1433
+ throw new UniffiInternalError.UnexpectedEnumCase();
1434
+ }
1435
+ }
1436
+ allocationSize(value: TypeName): number {
1437
+ switch (value.tag) {
1438
+ case SchemaBuildError_Tags.MissingRequiredField: {
1439
+ const inner = value.inner;
1440
+ let size = ordinalConverter.allocationSize(1);
1441
+ size += FfiConverterString.allocationSize(inner.recordType);
1442
+ size += FfiConverterString.allocationSize(inner.field);
1443
+ return size;
1444
+ }
1445
+ default: throw new UniffiInternalError.UnexpectedEnumCase();
1446
+ }
1447
+ }
1448
+ }
1449
+ return new FFIConverter();
1450
+ })();
1451
+
1452
+ export interface OsGymSandboxTemplateSpecBuilderLike {
1453
+
1454
+ build() /*throws*/: OsGymSandboxTemplateSpec;
1455
+ vmTemplate(value: VmTemplate): OsGymSandboxTemplateSpecBuilderLike;
1456
+ }
1457
+ /**
1458
+ * @deprecated Use `OsGymSandboxTemplateSpecBuilderLike` instead.
1459
+ */
1460
+ export type OsGymSandboxTemplateSpecBuilderInterface = OsGymSandboxTemplateSpecBuilderLike;
1461
+
1462
+
1463
+ export class OsGymSandboxTemplateSpecBuilder extends UniffiAbstractObject implements OsGymSandboxTemplateSpecBuilderLike {
1464
+
1465
+ readonly [uniffiTypeNameSymbol] = "OsGymSandboxTemplateSpecBuilder";
1466
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1467
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1468
+ constructor() {
1469
+ super();
1470
+ const pointer =
1471
+ uniffiCaller.rustCall(
1472
+ /*caller:*/ (callStatus) => {
1473
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_osgymsandboxtemplatespecbuilder_new(
1474
+ callStatus);
1475
+ },
1476
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1477
+ );
1478
+ this[pointerLiteralSymbol] = pointer;
1479
+ this[destructorGuardSymbol] = uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.bless(pointer);
1480
+ }
1481
+
1482
+
1483
+
1484
+
1485
+ build(): OsGymSandboxTemplateSpec /*throws*/ {
1486
+ return ((__rb: Uint8Array) => {
1487
+ try {
1488
+ return FfiConverterTypeOSGymSandboxTemplateSpec.lift(__rb);
1489
+ } finally {
1490
+ nativeModule().rustbuffer_free(__rb);
1491
+ }
1492
+ })(uniffiCaller.rustCallWithError(
1493
+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(FfiConverterTypeSchemaBuildError),
1494
+ /*caller:*/ (callStatus) => {
1495
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxtemplatespecbuilder_build(
1496
+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.clonePointer(this),
1497
+ callStatus);
1498
+ },
1499
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1500
+ ));
1501
+ }
1502
+
1503
+ vmTemplate(value: VmTemplate): OsGymSandboxTemplateSpecBuilderLike {
1504
+ return FfiConverterTypeOSGymSandboxTemplateSpecBuilder.lift(uniffiCaller.rustCall(
1505
+ /*caller:*/ (callStatus) => {
1506
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxtemplatespecbuilder_vm_template(
1507
+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.clonePointer(this),
1508
+ FfiConverterTypeVmTemplate.lower(value, nativeModule().rustbuffer_alloc),
1509
+ callStatus);
1510
+ },
1511
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1512
+ ));
1513
+ }
1514
+
1515
+
1516
+ uniffiDestroy(): void {
1517
+ const ptr = (this as any)[destructorGuardSymbol];
1518
+ if (ptr !== undefined) {
1519
+ const pointer = uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.pointer(this);
1520
+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.freePointer(pointer);
1521
+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.unbless(ptr);
1522
+ delete (this as any)[destructorGuardSymbol];
1523
+ }
1524
+ }
1525
+
1526
+ static instanceOf(obj_: any): obj_ is OsGymSandboxTemplateSpecBuilder {
1527
+ return uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.isConcreteType(obj_);
1528
+ }
1529
+
1530
+
1531
+ }
1532
+
1533
+ const uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory: UniffiObjectFactory<OsGymSandboxTemplateSpecBuilderLike> = (() => {
1534
+
1535
+ /// <reference lib="es2021" />
1536
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
1537
+ uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory.freePointer(heldValue);
1538
+ }) : null;
1539
+
1540
+ return {
1541
+ create(pointer: UniffiHandle): OsGymSandboxTemplateSpecBuilderLike {
1542
+ const instance = Object.create(OsGymSandboxTemplateSpecBuilder.prototype);
1543
+ instance[pointerLiteralSymbol] = pointer;
1544
+ instance[destructorGuardSymbol] = this.bless(pointer);
1545
+ instance[uniffiTypeNameSymbol] = "OsGymSandboxTemplateSpecBuilder";
1546
+ return instance;
1547
+ },
1548
+
1549
+
1550
+ bless(p: UniffiHandle): UniffiGcObject {
1551
+ const ptr = {
1552
+ p, // make sure this object doesn't get optimized away.
1553
+ markDestroyed: () => undefined,
1554
+ };
1555
+ if (registry) {
1556
+ registry.register(ptr, p, ptr);
1557
+ }
1558
+ return ptr;
1559
+ },
1560
+
1561
+ unbless(ptr_: UniffiGcObject) {
1562
+ if (registry) {
1563
+ registry.unregister(ptr_);
1564
+ }
1565
+ },
1566
+
1567
+ pointer(obj_: OsGymSandboxTemplateSpecBuilderLike): UniffiHandle {
1568
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
1569
+ throw new UniffiInternalError.UnexpectedNullPointer();
1570
+ }
1571
+ return (obj_ as any)[pointerLiteralSymbol];
1572
+ },
1573
+
1574
+ clonePointer(obj_: OsGymSandboxTemplateSpecBuilderLike): UniffiHandle {
1575
+ const pointer = this.pointer(obj_);
1576
+ return uniffiCaller.rustCall(
1577
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_osgymsandboxtemplatespecbuilder(pointer, callStatus),
1578
+ /*liftString:*/ FfiConverterString.lift
1579
+ );
1580
+ },
1581
+
1582
+ freePointer(pointer: UniffiHandle): void {
1583
+ uniffiCaller.rustCall(
1584
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_osgymsandboxtemplatespecbuilder(pointer, callStatus),
1585
+ /*liftString:*/ FfiConverterString.lift
1586
+ );
1587
+ },
1588
+
1589
+ isConcreteType(obj_: any): obj_ is OsGymSandboxTemplateSpecBuilderLike {
1590
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "OsGymSandboxTemplateSpecBuilder";
1591
+ },
1592
+ }})();
1593
+ const FfiConverterTypeOSGymSandboxTemplateSpecBuilder = new FfiConverterObject(uniffiTypeOsGymSandboxTemplateSpecBuilderObjectFactory);
1594
+
1595
+ export interface OsGymSandboxWarmPoolSpecBuilderLike {
1596
+
1597
+ autoscaling(value: WarmPoolAutoscaling): OsGymSandboxWarmPoolSpecBuilderLike;
1598
+ build() /*throws*/: OsGymSandboxWarmPoolSpec;
1599
+ idleTtlSeconds(value: number): OsGymSandboxWarmPoolSpecBuilderLike;
1600
+ replicas(value: number): OsGymSandboxWarmPoolSpecBuilderLike;
1601
+ sandboxTemplateRef(value: SandboxTemplateRef): OsGymSandboxWarmPoolSpecBuilderLike;
1602
+ ttlPolicy(value: WarmPoolTtlPolicy): OsGymSandboxWarmPoolSpecBuilderLike;
1603
+ ttlSecondsAfterCreated(value: number): OsGymSandboxWarmPoolSpecBuilderLike;
1604
+ }
1605
+ /**
1606
+ * @deprecated Use `OsGymSandboxWarmPoolSpecBuilderLike` instead.
1607
+ */
1608
+ export type OsGymSandboxWarmPoolSpecBuilderInterface = OsGymSandboxWarmPoolSpecBuilderLike;
1609
+
1610
+
1611
+ export class OsGymSandboxWarmPoolSpecBuilder extends UniffiAbstractObject implements OsGymSandboxWarmPoolSpecBuilderLike {
1612
+
1613
+ readonly [uniffiTypeNameSymbol] = "OsGymSandboxWarmPoolSpecBuilder";
1614
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1615
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1616
+ constructor() {
1617
+ super();
1618
+ const pointer =
1619
+ uniffiCaller.rustCall(
1620
+ /*caller:*/ (callStatus) => {
1621
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_osgymsandboxwarmpoolspecbuilder_new(
1622
+ callStatus);
1623
+ },
1624
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1625
+ );
1626
+ this[pointerLiteralSymbol] = pointer;
1627
+ this[destructorGuardSymbol] = uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.bless(pointer);
1628
+ }
1629
+
1630
+
1631
+
1632
+
1633
+ autoscaling(value: WarmPoolAutoscaling): OsGymSandboxWarmPoolSpecBuilderLike {
1634
+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(uniffiCaller.rustCall(
1635
+ /*caller:*/ (callStatus) => {
1636
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_autoscaling(
1637
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1638
+ FfiConverterTypeWarmPoolAutoscaling.lower(value, nativeModule().rustbuffer_alloc),
1639
+ callStatus);
1640
+ },
1641
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1642
+ ));
1643
+ }
1644
+
1645
+ build(): OsGymSandboxWarmPoolSpec /*throws*/ {
1646
+ return ((__rb: Uint8Array) => {
1647
+ try {
1648
+ return FfiConverterTypeOSGymSandboxWarmPoolSpec.lift(__rb);
1649
+ } finally {
1650
+ nativeModule().rustbuffer_free(__rb);
1651
+ }
1652
+ })(uniffiCaller.rustCallWithError(
1653
+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(FfiConverterTypeSchemaBuildError),
1654
+ /*caller:*/ (callStatus) => {
1655
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_build(
1656
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1657
+ callStatus);
1658
+ },
1659
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1660
+ ));
1661
+ }
1662
+
1663
+ idleTtlSeconds(value: number): OsGymSandboxWarmPoolSpecBuilderLike {
1664
+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(uniffiCaller.rustCall(
1665
+ /*caller:*/ (callStatus) => {
1666
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_idle_ttl_seconds(
1667
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1668
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
1669
+ callStatus);
1670
+ },
1671
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1672
+ ));
1673
+ }
1674
+
1675
+ replicas(value: number): OsGymSandboxWarmPoolSpecBuilderLike {
1676
+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(uniffiCaller.rustCall(
1677
+ /*caller:*/ (callStatus) => {
1678
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_replicas(
1679
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1680
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
1681
+ callStatus);
1682
+ },
1683
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1684
+ ));
1685
+ }
1686
+
1687
+ sandboxTemplateRef(value: SandboxTemplateRef): OsGymSandboxWarmPoolSpecBuilderLike {
1688
+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(uniffiCaller.rustCall(
1689
+ /*caller:*/ (callStatus) => {
1690
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref(
1691
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1692
+ FfiConverterTypeSandboxTemplateRef.lower(value, nativeModule().rustbuffer_alloc),
1693
+ callStatus);
1694
+ },
1695
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1696
+ ));
1697
+ }
1698
+
1699
+ ttlPolicy(value: WarmPoolTtlPolicy): OsGymSandboxWarmPoolSpecBuilderLike {
1700
+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(uniffiCaller.rustCall(
1701
+ /*caller:*/ (callStatus) => {
1702
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_ttl_policy(
1703
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1704
+ FfiConverterTypeWarmPoolTtlPolicy.lower(value, nativeModule().rustbuffer_alloc),
1705
+ callStatus);
1706
+ },
1707
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1708
+ ));
1709
+ }
1710
+
1711
+ ttlSecondsAfterCreated(value: number): OsGymSandboxWarmPoolSpecBuilderLike {
1712
+ return FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder.lift(uniffiCaller.rustCall(
1713
+ /*caller:*/ (callStatus) => {
1714
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_osgymsandboxwarmpoolspecbuilder_ttl_seconds_after_created(
1715
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.clonePointer(this),
1716
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
1717
+ callStatus);
1718
+ },
1719
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1720
+ ));
1721
+ }
1722
+
1723
+
1724
+ uniffiDestroy(): void {
1725
+ const ptr = (this as any)[destructorGuardSymbol];
1726
+ if (ptr !== undefined) {
1727
+ const pointer = uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.pointer(this);
1728
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.freePointer(pointer);
1729
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.unbless(ptr);
1730
+ delete (this as any)[destructorGuardSymbol];
1731
+ }
1732
+ }
1733
+
1734
+ static instanceOf(obj_: any): obj_ is OsGymSandboxWarmPoolSpecBuilder {
1735
+ return uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.isConcreteType(obj_);
1736
+ }
1737
+
1738
+
1739
+ }
1740
+
1741
+ const uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory: UniffiObjectFactory<OsGymSandboxWarmPoolSpecBuilderLike> = (() => {
1742
+
1743
+ /// <reference lib="es2021" />
1744
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
1745
+ uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory.freePointer(heldValue);
1746
+ }) : null;
1747
+
1748
+ return {
1749
+ create(pointer: UniffiHandle): OsGymSandboxWarmPoolSpecBuilderLike {
1750
+ const instance = Object.create(OsGymSandboxWarmPoolSpecBuilder.prototype);
1751
+ instance[pointerLiteralSymbol] = pointer;
1752
+ instance[destructorGuardSymbol] = this.bless(pointer);
1753
+ instance[uniffiTypeNameSymbol] = "OsGymSandboxWarmPoolSpecBuilder";
1754
+ return instance;
1755
+ },
1756
+
1757
+
1758
+ bless(p: UniffiHandle): UniffiGcObject {
1759
+ const ptr = {
1760
+ p, // make sure this object doesn't get optimized away.
1761
+ markDestroyed: () => undefined,
1762
+ };
1763
+ if (registry) {
1764
+ registry.register(ptr, p, ptr);
1765
+ }
1766
+ return ptr;
1767
+ },
1768
+
1769
+ unbless(ptr_: UniffiGcObject) {
1770
+ if (registry) {
1771
+ registry.unregister(ptr_);
1772
+ }
1773
+ },
1774
+
1775
+ pointer(obj_: OsGymSandboxWarmPoolSpecBuilderLike): UniffiHandle {
1776
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
1777
+ throw new UniffiInternalError.UnexpectedNullPointer();
1778
+ }
1779
+ return (obj_ as any)[pointerLiteralSymbol];
1780
+ },
1781
+
1782
+ clonePointer(obj_: OsGymSandboxWarmPoolSpecBuilderLike): UniffiHandle {
1783
+ const pointer = this.pointer(obj_);
1784
+ return uniffiCaller.rustCall(
1785
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_osgymsandboxwarmpoolspecbuilder(pointer, callStatus),
1786
+ /*liftString:*/ FfiConverterString.lift
1787
+ );
1788
+ },
1789
+
1790
+ freePointer(pointer: UniffiHandle): void {
1791
+ uniffiCaller.rustCall(
1792
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_osgymsandboxwarmpoolspecbuilder(pointer, callStatus),
1793
+ /*liftString:*/ FfiConverterString.lift
1794
+ );
1795
+ },
1796
+
1797
+ isConcreteType(obj_: any): obj_ is OsGymSandboxWarmPoolSpecBuilderLike {
1798
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "OsGymSandboxWarmPoolSpecBuilder";
1799
+ },
1800
+ }})();
1801
+ const FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder = new FfiConverterObject(uniffiTypeOsGymSandboxWarmPoolSpecBuilderObjectFactory);
1802
+
1803
+ export interface SandboxServiceBuilderLike {
1804
+
1805
+ build() /*throws*/: SandboxService;
1806
+ name(value: string): SandboxServiceBuilderLike;
1807
+ protocol(value: ServiceProtocol): SandboxServiceBuilderLike;
1808
+ targetPort(value: number): SandboxServiceBuilderLike;
1809
+ }
1810
+ /**
1811
+ * @deprecated Use `SandboxServiceBuilderLike` instead.
1812
+ */
1813
+ export type SandboxServiceBuilderInterface = SandboxServiceBuilderLike;
1814
+
1815
+
1816
+ export class SandboxServiceBuilder extends UniffiAbstractObject implements SandboxServiceBuilderLike {
1817
+
1818
+ readonly [uniffiTypeNameSymbol] = "SandboxServiceBuilder";
1819
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1820
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1821
+ constructor() {
1822
+ super();
1823
+ const pointer =
1824
+ uniffiCaller.rustCall(
1825
+ /*caller:*/ (callStatus) => {
1826
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_sandboxservicebuilder_new(
1827
+ callStatus);
1828
+ },
1829
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1830
+ );
1831
+ this[pointerLiteralSymbol] = pointer;
1832
+ this[destructorGuardSymbol] = uniffiTypeSandboxServiceBuilderObjectFactory.bless(pointer);
1833
+ }
1834
+
1835
+
1836
+
1837
+
1838
+ build(): SandboxService /*throws*/ {
1839
+ return ((__rb: Uint8Array) => {
1840
+ try {
1841
+ return FfiConverterTypeSandboxService.lift(__rb);
1842
+ } finally {
1843
+ nativeModule().rustbuffer_free(__rb);
1844
+ }
1845
+ })(uniffiCaller.rustCallWithError(
1846
+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(FfiConverterTypeSchemaBuildError),
1847
+ /*caller:*/ (callStatus) => {
1848
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_build(
1849
+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),
1850
+ callStatus);
1851
+ },
1852
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1853
+ ));
1854
+ }
1855
+
1856
+ name(value: string): SandboxServiceBuilderLike {
1857
+ return FfiConverterTypeSandboxServiceBuilder.lift(uniffiCaller.rustCall(
1858
+ /*caller:*/ (callStatus) => {
1859
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_name(
1860
+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),
1861
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
1862
+ callStatus);
1863
+ },
1864
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1865
+ ));
1866
+ }
1867
+
1868
+ protocol(value: ServiceProtocol): SandboxServiceBuilderLike {
1869
+ return FfiConverterTypeSandboxServiceBuilder.lift(uniffiCaller.rustCall(
1870
+ /*caller:*/ (callStatus) => {
1871
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_protocol(
1872
+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),
1873
+ FfiConverterTypeServiceProtocol.lower(value, nativeModule().rustbuffer_alloc),
1874
+ callStatus);
1875
+ },
1876
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1877
+ ));
1878
+ }
1879
+
1880
+ targetPort(value: number): SandboxServiceBuilderLike {
1881
+ return FfiConverterTypeSandboxServiceBuilder.lift(uniffiCaller.rustCall(
1882
+ /*caller:*/ (callStatus) => {
1883
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxservicebuilder_target_port(
1884
+ uniffiTypeSandboxServiceBuilderObjectFactory.clonePointer(this),
1885
+ FfiConverterUInt16.lower(value, nativeModule().rustbuffer_alloc),
1886
+ callStatus);
1887
+ },
1888
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1889
+ ));
1890
+ }
1891
+
1892
+
1893
+ uniffiDestroy(): void {
1894
+ const ptr = (this as any)[destructorGuardSymbol];
1895
+ if (ptr !== undefined) {
1896
+ const pointer = uniffiTypeSandboxServiceBuilderObjectFactory.pointer(this);
1897
+ uniffiTypeSandboxServiceBuilderObjectFactory.freePointer(pointer);
1898
+ uniffiTypeSandboxServiceBuilderObjectFactory.unbless(ptr);
1899
+ delete (this as any)[destructorGuardSymbol];
1900
+ }
1901
+ }
1902
+
1903
+ static instanceOf(obj_: any): obj_ is SandboxServiceBuilder {
1904
+ return uniffiTypeSandboxServiceBuilderObjectFactory.isConcreteType(obj_);
1905
+ }
1906
+
1907
+
1908
+ }
1909
+
1910
+ const uniffiTypeSandboxServiceBuilderObjectFactory: UniffiObjectFactory<SandboxServiceBuilderLike> = (() => {
1911
+
1912
+ /// <reference lib="es2021" />
1913
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
1914
+ uniffiTypeSandboxServiceBuilderObjectFactory.freePointer(heldValue);
1915
+ }) : null;
1916
+
1917
+ return {
1918
+ create(pointer: UniffiHandle): SandboxServiceBuilderLike {
1919
+ const instance = Object.create(SandboxServiceBuilder.prototype);
1920
+ instance[pointerLiteralSymbol] = pointer;
1921
+ instance[destructorGuardSymbol] = this.bless(pointer);
1922
+ instance[uniffiTypeNameSymbol] = "SandboxServiceBuilder";
1923
+ return instance;
1924
+ },
1925
+
1926
+
1927
+ bless(p: UniffiHandle): UniffiGcObject {
1928
+ const ptr = {
1929
+ p, // make sure this object doesn't get optimized away.
1930
+ markDestroyed: () => undefined,
1931
+ };
1932
+ if (registry) {
1933
+ registry.register(ptr, p, ptr);
1934
+ }
1935
+ return ptr;
1936
+ },
1937
+
1938
+ unbless(ptr_: UniffiGcObject) {
1939
+ if (registry) {
1940
+ registry.unregister(ptr_);
1941
+ }
1942
+ },
1943
+
1944
+ pointer(obj_: SandboxServiceBuilderLike): UniffiHandle {
1945
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
1946
+ throw new UniffiInternalError.UnexpectedNullPointer();
1947
+ }
1948
+ return (obj_ as any)[pointerLiteralSymbol];
1949
+ },
1950
+
1951
+ clonePointer(obj_: SandboxServiceBuilderLike): UniffiHandle {
1952
+ const pointer = this.pointer(obj_);
1953
+ return uniffiCaller.rustCall(
1954
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_sandboxservicebuilder(pointer, callStatus),
1955
+ /*liftString:*/ FfiConverterString.lift
1956
+ );
1957
+ },
1958
+
1959
+ freePointer(pointer: UniffiHandle): void {
1960
+ uniffiCaller.rustCall(
1961
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_sandboxservicebuilder(pointer, callStatus),
1962
+ /*liftString:*/ FfiConverterString.lift
1963
+ );
1964
+ },
1965
+
1966
+ isConcreteType(obj_: any): obj_ is SandboxServiceBuilderLike {
1967
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "SandboxServiceBuilder";
1968
+ },
1969
+ }})();
1970
+ const FfiConverterTypeSandboxServiceBuilder = new FfiConverterObject(uniffiTypeSandboxServiceBuilderObjectFactory);
1971
+
1972
+ export interface SandboxTemplateRefBuilderLike {
1973
+
1974
+ build() /*throws*/: SandboxTemplateRef;
1975
+ name(value: string): SandboxTemplateRefBuilderLike;
1976
+ }
1977
+ /**
1978
+ * @deprecated Use `SandboxTemplateRefBuilderLike` instead.
1979
+ */
1980
+ export type SandboxTemplateRefBuilderInterface = SandboxTemplateRefBuilderLike;
1981
+
1982
+
1983
+ export class SandboxTemplateRefBuilder extends UniffiAbstractObject implements SandboxTemplateRefBuilderLike {
1984
+
1985
+ readonly [uniffiTypeNameSymbol] = "SandboxTemplateRefBuilder";
1986
+ readonly [destructorGuardSymbol]: UniffiGcObject;
1987
+ readonly [pointerLiteralSymbol]: UniffiHandle;
1988
+ constructor() {
1989
+ super();
1990
+ const pointer =
1991
+ uniffiCaller.rustCall(
1992
+ /*caller:*/ (callStatus) => {
1993
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_sandboxtemplaterefbuilder_new(
1994
+ callStatus);
1995
+ },
1996
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
1997
+ );
1998
+ this[pointerLiteralSymbol] = pointer;
1999
+ this[destructorGuardSymbol] = uniffiTypeSandboxTemplateRefBuilderObjectFactory.bless(pointer);
2000
+ }
2001
+
2002
+
2003
+
2004
+
2005
+ build(): SandboxTemplateRef /*throws*/ {
2006
+ return ((__rb: Uint8Array) => {
2007
+ try {
2008
+ return FfiConverterTypeSandboxTemplateRef.lift(__rb);
2009
+ } finally {
2010
+ nativeModule().rustbuffer_free(__rb);
2011
+ }
2012
+ })(uniffiCaller.rustCallWithError(
2013
+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(FfiConverterTypeSchemaBuildError),
2014
+ /*caller:*/ (callStatus) => {
2015
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxtemplaterefbuilder_build(
2016
+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.clonePointer(this),
2017
+ callStatus);
2018
+ },
2019
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2020
+ ));
2021
+ }
2022
+
2023
+ name(value: string): SandboxTemplateRefBuilderLike {
2024
+ return FfiConverterTypeSandboxTemplateRefBuilder.lift(uniffiCaller.rustCall(
2025
+ /*caller:*/ (callStatus) => {
2026
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_sandboxtemplaterefbuilder_name(
2027
+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.clonePointer(this),
2028
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
2029
+ callStatus);
2030
+ },
2031
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2032
+ ));
2033
+ }
2034
+
2035
+
2036
+ uniffiDestroy(): void {
2037
+ const ptr = (this as any)[destructorGuardSymbol];
2038
+ if (ptr !== undefined) {
2039
+ const pointer = uniffiTypeSandboxTemplateRefBuilderObjectFactory.pointer(this);
2040
+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.freePointer(pointer);
2041
+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.unbless(ptr);
2042
+ delete (this as any)[destructorGuardSymbol];
2043
+ }
2044
+ }
2045
+
2046
+ static instanceOf(obj_: any): obj_ is SandboxTemplateRefBuilder {
2047
+ return uniffiTypeSandboxTemplateRefBuilderObjectFactory.isConcreteType(obj_);
2048
+ }
2049
+
2050
+
2051
+ }
2052
+
2053
+ const uniffiTypeSandboxTemplateRefBuilderObjectFactory: UniffiObjectFactory<SandboxTemplateRefBuilderLike> = (() => {
2054
+
2055
+ /// <reference lib="es2021" />
2056
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
2057
+ uniffiTypeSandboxTemplateRefBuilderObjectFactory.freePointer(heldValue);
2058
+ }) : null;
2059
+
2060
+ return {
2061
+ create(pointer: UniffiHandle): SandboxTemplateRefBuilderLike {
2062
+ const instance = Object.create(SandboxTemplateRefBuilder.prototype);
2063
+ instance[pointerLiteralSymbol] = pointer;
2064
+ instance[destructorGuardSymbol] = this.bless(pointer);
2065
+ instance[uniffiTypeNameSymbol] = "SandboxTemplateRefBuilder";
2066
+ return instance;
2067
+ },
2068
+
2069
+
2070
+ bless(p: UniffiHandle): UniffiGcObject {
2071
+ const ptr = {
2072
+ p, // make sure this object doesn't get optimized away.
2073
+ markDestroyed: () => undefined,
2074
+ };
2075
+ if (registry) {
2076
+ registry.register(ptr, p, ptr);
2077
+ }
2078
+ return ptr;
2079
+ },
2080
+
2081
+ unbless(ptr_: UniffiGcObject) {
2082
+ if (registry) {
2083
+ registry.unregister(ptr_);
2084
+ }
2085
+ },
2086
+
2087
+ pointer(obj_: SandboxTemplateRefBuilderLike): UniffiHandle {
2088
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
2089
+ throw new UniffiInternalError.UnexpectedNullPointer();
2090
+ }
2091
+ return (obj_ as any)[pointerLiteralSymbol];
2092
+ },
2093
+
2094
+ clonePointer(obj_: SandboxTemplateRefBuilderLike): UniffiHandle {
2095
+ const pointer = this.pointer(obj_);
2096
+ return uniffiCaller.rustCall(
2097
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_sandboxtemplaterefbuilder(pointer, callStatus),
2098
+ /*liftString:*/ FfiConverterString.lift
2099
+ );
2100
+ },
2101
+
2102
+ freePointer(pointer: UniffiHandle): void {
2103
+ uniffiCaller.rustCall(
2104
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_sandboxtemplaterefbuilder(pointer, callStatus),
2105
+ /*liftString:*/ FfiConverterString.lift
2106
+ );
2107
+ },
2108
+
2109
+ isConcreteType(obj_: any): obj_ is SandboxTemplateRefBuilderLike {
2110
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "SandboxTemplateRefBuilder";
2111
+ },
2112
+ }})();
2113
+ const FfiConverterTypeSandboxTemplateRefBuilder = new FfiConverterObject(uniffiTypeSandboxTemplateRefBuilderObjectFactory);
2114
+
2115
+ export interface VmTemplateBuilderLike {
2116
+
2117
+ args(value: Array<string>): VmTemplateBuilderLike;
2118
+ build() /*throws*/: VmTemplate;
2119
+ claimSecrets(value: boolean): VmTemplateBuilderLike;
2120
+ command(value: Array<string>): VmTemplateBuilderLike;
2121
+ containerDiskImage(value: string): VmTemplateBuilderLike;
2122
+ cpuCores(value: number): VmTemplateBuilderLike;
2123
+ env(value: Map<string, string>): VmTemplateBuilderLike;
2124
+ firmware(value: Firmware): VmTemplateBuilderLike;
2125
+ imagePullPolicy(value: ImagePullPolicy): VmTemplateBuilderLike;
2126
+ imagePullSecret(value: string): VmTemplateBuilderLike;
2127
+ memory(value: string): VmTemplateBuilderLike;
2128
+ nestedVirtualization(value: boolean): VmTemplateBuilderLike;
2129
+ nodeSelector(value: Map<string, string>): VmTemplateBuilderLike;
2130
+ oidc(value: OidcConfig): VmTemplateBuilderLike;
2131
+ probes(value: PreservedJsonLike): VmTemplateBuilderLike;
2132
+ processMode(value: ProcessMode): VmTemplateBuilderLike;
2133
+ runtime(value: RuntimeKind): VmTemplateBuilderLike;
2134
+ runtimeClassName(value: string): VmTemplateBuilderLike;
2135
+ services(value: Array<SandboxService>): VmTemplateBuilderLike;
2136
+ tolerations(value: Array<PreservedJsonLike>): VmTemplateBuilderLike;
2137
+ }
2138
+ /**
2139
+ * @deprecated Use `VmTemplateBuilderLike` instead.
2140
+ */
2141
+ export type VmTemplateBuilderInterface = VmTemplateBuilderLike;
2142
+
2143
+
2144
+ export class VmTemplateBuilder extends UniffiAbstractObject implements VmTemplateBuilderLike {
2145
+
2146
+ readonly [uniffiTypeNameSymbol] = "VmTemplateBuilder";
2147
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2148
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2149
+ constructor() {
2150
+ super();
2151
+ const pointer =
2152
+ uniffiCaller.rustCall(
2153
+ /*caller:*/ (callStatus) => {
2154
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_vmtemplatebuilder_new(
2155
+ callStatus);
2156
+ },
2157
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2158
+ );
2159
+ this[pointerLiteralSymbol] = pointer;
2160
+ this[destructorGuardSymbol] = uniffiTypeVmTemplateBuilderObjectFactory.bless(pointer);
2161
+ }
2162
+
2163
+
2164
+
2165
+
2166
+ args(value: Array<string>): VmTemplateBuilderLike {
2167
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2168
+ /*caller:*/ (callStatus) => {
2169
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_args(
2170
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2171
+ FfiConverterSequenceString.lower(value, nativeModule().rustbuffer_alloc),
2172
+ callStatus);
2173
+ },
2174
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2175
+ ));
2176
+ }
2177
+
2178
+ build(): VmTemplate /*throws*/ {
2179
+ return ((__rb: Uint8Array) => {
2180
+ try {
2181
+ return FfiConverterTypeVmTemplate.lift(__rb);
2182
+ } finally {
2183
+ nativeModule().rustbuffer_free(__rb);
2184
+ }
2185
+ })(uniffiCaller.rustCallWithError(
2186
+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(FfiConverterTypeSchemaBuildError),
2187
+ /*caller:*/ (callStatus) => {
2188
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_build(
2189
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2190
+ callStatus);
2191
+ },
2192
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2193
+ ));
2194
+ }
2195
+
2196
+ claimSecrets(value: boolean): VmTemplateBuilderLike {
2197
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2198
+ /*caller:*/ (callStatus) => {
2199
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_claim_secrets(
2200
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2201
+ FfiConverterBool.lower(value, nativeModule().rustbuffer_alloc),
2202
+ callStatus);
2203
+ },
2204
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2205
+ ));
2206
+ }
2207
+
2208
+ command(value: Array<string>): VmTemplateBuilderLike {
2209
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2210
+ /*caller:*/ (callStatus) => {
2211
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_command(
2212
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2213
+ FfiConverterSequenceString.lower(value, nativeModule().rustbuffer_alloc),
2214
+ callStatus);
2215
+ },
2216
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2217
+ ));
2218
+ }
2219
+
2220
+ containerDiskImage(value: string): VmTemplateBuilderLike {
2221
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2222
+ /*caller:*/ (callStatus) => {
2223
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_container_disk_image(
2224
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2225
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
2226
+ callStatus);
2227
+ },
2228
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2229
+ ));
2230
+ }
2231
+
2232
+ cpuCores(value: number): VmTemplateBuilderLike {
2233
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2234
+ /*caller:*/ (callStatus) => {
2235
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_cpu_cores(
2236
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2237
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
2238
+ callStatus);
2239
+ },
2240
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2241
+ ));
2242
+ }
2243
+
2244
+ env(value: Map<string, string>): VmTemplateBuilderLike {
2245
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2246
+ /*caller:*/ (callStatus) => {
2247
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_env(
2248
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2249
+ FfiConverterMapStringString.lower(value, nativeModule().rustbuffer_alloc),
2250
+ callStatus);
2251
+ },
2252
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2253
+ ));
2254
+ }
2255
+
2256
+ firmware(value: Firmware): VmTemplateBuilderLike {
2257
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2258
+ /*caller:*/ (callStatus) => {
2259
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_firmware(
2260
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2261
+ FfiConverterTypeFirmware.lower(value, nativeModule().rustbuffer_alloc),
2262
+ callStatus);
2263
+ },
2264
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2265
+ ));
2266
+ }
2267
+
2268
+ imagePullPolicy(value: ImagePullPolicy): VmTemplateBuilderLike {
2269
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2270
+ /*caller:*/ (callStatus) => {
2271
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_policy(
2272
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2273
+ FfiConverterTypeImagePullPolicy.lower(value, nativeModule().rustbuffer_alloc),
2274
+ callStatus);
2275
+ },
2276
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2277
+ ));
2278
+ }
2279
+
2280
+ imagePullSecret(value: string): VmTemplateBuilderLike {
2281
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2282
+ /*caller:*/ (callStatus) => {
2283
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_image_pull_secret(
2284
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2285
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
2286
+ callStatus);
2287
+ },
2288
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2289
+ ));
2290
+ }
2291
+
2292
+ memory(value: string): VmTemplateBuilderLike {
2293
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2294
+ /*caller:*/ (callStatus) => {
2295
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_memory(
2296
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2297
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
2298
+ callStatus);
2299
+ },
2300
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2301
+ ));
2302
+ }
2303
+
2304
+ nestedVirtualization(value: boolean): VmTemplateBuilderLike {
2305
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2306
+ /*caller:*/ (callStatus) => {
2307
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_nested_virtualization(
2308
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2309
+ FfiConverterBool.lower(value, nativeModule().rustbuffer_alloc),
2310
+ callStatus);
2311
+ },
2312
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2313
+ ));
2314
+ }
2315
+
2316
+ nodeSelector(value: Map<string, string>): VmTemplateBuilderLike {
2317
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2318
+ /*caller:*/ (callStatus) => {
2319
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_node_selector(
2320
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2321
+ FfiConverterMapStringString.lower(value, nativeModule().rustbuffer_alloc),
2322
+ callStatus);
2323
+ },
2324
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2325
+ ));
2326
+ }
2327
+
2328
+ oidc(value: OidcConfig): VmTemplateBuilderLike {
2329
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2330
+ /*caller:*/ (callStatus) => {
2331
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_oidc(
2332
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2333
+ FfiConverterTypeOidcConfig.lower(value, nativeModule().rustbuffer_alloc),
2334
+ callStatus);
2335
+ },
2336
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2337
+ ));
2338
+ }
2339
+
2340
+ probes(value: PreservedJsonLike): VmTemplateBuilderLike {
2341
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2342
+ /*caller:*/ (callStatus) => {
2343
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_probes(
2344
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2345
+ FfiConverterTypePreservedJson.lower(value, nativeModule().rustbuffer_alloc),
2346
+ callStatus);
2347
+ },
2348
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2349
+ ));
2350
+ }
2351
+
2352
+ processMode(value: ProcessMode): VmTemplateBuilderLike {
2353
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2354
+ /*caller:*/ (callStatus) => {
2355
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_process_mode(
2356
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2357
+ FfiConverterTypeProcessMode.lower(value, nativeModule().rustbuffer_alloc),
2358
+ callStatus);
2359
+ },
2360
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2361
+ ));
2362
+ }
2363
+
2364
+ runtime(value: RuntimeKind): VmTemplateBuilderLike {
2365
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2366
+ /*caller:*/ (callStatus) => {
2367
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime(
2368
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2369
+ FfiConverterTypeRuntimeKind.lower(value, nativeModule().rustbuffer_alloc),
2370
+ callStatus);
2371
+ },
2372
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2373
+ ));
2374
+ }
2375
+
2376
+ runtimeClassName(value: string): VmTemplateBuilderLike {
2377
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2378
+ /*caller:*/ (callStatus) => {
2379
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_runtime_class_name(
2380
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2381
+ FfiConverterString.lower(value, nativeModule().rustbuffer_alloc),
2382
+ callStatus);
2383
+ },
2384
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2385
+ ));
2386
+ }
2387
+
2388
+ services(value: Array<SandboxService>): VmTemplateBuilderLike {
2389
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2390
+ /*caller:*/ (callStatus) => {
2391
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_services(
2392
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2393
+ FfiConverterSequenceTypeSandboxService.lower(value, nativeModule().rustbuffer_alloc),
2394
+ callStatus);
2395
+ },
2396
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2397
+ ));
2398
+ }
2399
+
2400
+ tolerations(value: Array<PreservedJsonLike>): VmTemplateBuilderLike {
2401
+ return FfiConverterTypeVmTemplateBuilder.lift(uniffiCaller.rustCall(
2402
+ /*caller:*/ (callStatus) => {
2403
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_vmtemplatebuilder_tolerations(
2404
+ uniffiTypeVmTemplateBuilderObjectFactory.clonePointer(this),
2405
+ FfiConverterSequenceTypePreservedJson.lower(value, nativeModule().rustbuffer_alloc),
2406
+ callStatus);
2407
+ },
2408
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2409
+ ));
2410
+ }
2411
+
2412
+
2413
+ uniffiDestroy(): void {
2414
+ const ptr = (this as any)[destructorGuardSymbol];
2415
+ if (ptr !== undefined) {
2416
+ const pointer = uniffiTypeVmTemplateBuilderObjectFactory.pointer(this);
2417
+ uniffiTypeVmTemplateBuilderObjectFactory.freePointer(pointer);
2418
+ uniffiTypeVmTemplateBuilderObjectFactory.unbless(ptr);
2419
+ delete (this as any)[destructorGuardSymbol];
2420
+ }
2421
+ }
2422
+
2423
+ static instanceOf(obj_: any): obj_ is VmTemplateBuilder {
2424
+ return uniffiTypeVmTemplateBuilderObjectFactory.isConcreteType(obj_);
2425
+ }
2426
+
2427
+
2428
+ }
2429
+
2430
+ const uniffiTypeVmTemplateBuilderObjectFactory: UniffiObjectFactory<VmTemplateBuilderLike> = (() => {
2431
+
2432
+ /// <reference lib="es2021" />
2433
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
2434
+ uniffiTypeVmTemplateBuilderObjectFactory.freePointer(heldValue);
2435
+ }) : null;
2436
+
2437
+ return {
2438
+ create(pointer: UniffiHandle): VmTemplateBuilderLike {
2439
+ const instance = Object.create(VmTemplateBuilder.prototype);
2440
+ instance[pointerLiteralSymbol] = pointer;
2441
+ instance[destructorGuardSymbol] = this.bless(pointer);
2442
+ instance[uniffiTypeNameSymbol] = "VmTemplateBuilder";
2443
+ return instance;
2444
+ },
2445
+
2446
+
2447
+ bless(p: UniffiHandle): UniffiGcObject {
2448
+ const ptr = {
2449
+ p, // make sure this object doesn't get optimized away.
2450
+ markDestroyed: () => undefined,
2451
+ };
2452
+ if (registry) {
2453
+ registry.register(ptr, p, ptr);
2454
+ }
2455
+ return ptr;
2456
+ },
2457
+
2458
+ unbless(ptr_: UniffiGcObject) {
2459
+ if (registry) {
2460
+ registry.unregister(ptr_);
2461
+ }
2462
+ },
2463
+
2464
+ pointer(obj_: VmTemplateBuilderLike): UniffiHandle {
2465
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
2466
+ throw new UniffiInternalError.UnexpectedNullPointer();
2467
+ }
2468
+ return (obj_ as any)[pointerLiteralSymbol];
2469
+ },
2470
+
2471
+ clonePointer(obj_: VmTemplateBuilderLike): UniffiHandle {
2472
+ const pointer = this.pointer(obj_);
2473
+ return uniffiCaller.rustCall(
2474
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_vmtemplatebuilder(pointer, callStatus),
2475
+ /*liftString:*/ FfiConverterString.lift
2476
+ );
2477
+ },
2478
+
2479
+ freePointer(pointer: UniffiHandle): void {
2480
+ uniffiCaller.rustCall(
2481
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_vmtemplatebuilder(pointer, callStatus),
2482
+ /*liftString:*/ FfiConverterString.lift
2483
+ );
2484
+ },
2485
+
2486
+ isConcreteType(obj_: any): obj_ is VmTemplateBuilderLike {
2487
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "VmTemplateBuilder";
2488
+ },
2489
+ }})();
2490
+ const FfiConverterTypeVmTemplateBuilder = new FfiConverterObject(uniffiTypeVmTemplateBuilderObjectFactory);
2491
+
2492
+ export interface WarmPoolAutoscalingBuilderLike {
2493
+
2494
+ build() /*throws*/: WarmPoolAutoscaling;
2495
+ initialPoolSize(value: number): WarmPoolAutoscalingBuilderLike;
2496
+ maxPoolSize(value: number): WarmPoolAutoscalingBuilderLike;
2497
+ minPoolSize(value: number): WarmPoolAutoscalingBuilderLike;
2498
+ }
2499
+ /**
2500
+ * @deprecated Use `WarmPoolAutoscalingBuilderLike` instead.
2501
+ */
2502
+ export type WarmPoolAutoscalingBuilderInterface = WarmPoolAutoscalingBuilderLike;
2503
+
2504
+
2505
+ export class WarmPoolAutoscalingBuilder extends UniffiAbstractObject implements WarmPoolAutoscalingBuilderLike {
2506
+
2507
+ readonly [uniffiTypeNameSymbol] = "WarmPoolAutoscalingBuilder";
2508
+ readonly [destructorGuardSymbol]: UniffiGcObject;
2509
+ readonly [pointerLiteralSymbol]: UniffiHandle;
2510
+ constructor() {
2511
+ super();
2512
+ const pointer =
2513
+ uniffiCaller.rustCall(
2514
+ /*caller:*/ (callStatus) => {
2515
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_constructor_warmpoolautoscalingbuilder_new(
2516
+ callStatus);
2517
+ },
2518
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2519
+ );
2520
+ this[pointerLiteralSymbol] = pointer;
2521
+ this[destructorGuardSymbol] = uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.bless(pointer);
2522
+ }
2523
+
2524
+
2525
+
2526
+
2527
+ build(): WarmPoolAutoscaling /*throws*/ {
2528
+ return ((__rb: Uint8Array) => {
2529
+ try {
2530
+ return FfiConverterTypeWarmPoolAutoscaling.lift(__rb);
2531
+ } finally {
2532
+ nativeModule().rustbuffer_free(__rb);
2533
+ }
2534
+ })(uniffiCaller.rustCallWithError(
2535
+ /*liftError:*/ FfiConverterTypeSchemaBuildError.lift.bind(FfiConverterTypeSchemaBuildError),
2536
+ /*caller:*/ (callStatus) => {
2537
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_build(
2538
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(this),
2539
+ callStatus);
2540
+ },
2541
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2542
+ ));
2543
+ }
2544
+
2545
+ initialPoolSize(value: number): WarmPoolAutoscalingBuilderLike {
2546
+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(uniffiCaller.rustCall(
2547
+ /*caller:*/ (callStatus) => {
2548
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_initial_pool_size(
2549
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(this),
2550
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
2551
+ callStatus);
2552
+ },
2553
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2554
+ ));
2555
+ }
2556
+
2557
+ maxPoolSize(value: number): WarmPoolAutoscalingBuilderLike {
2558
+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(uniffiCaller.rustCall(
2559
+ /*caller:*/ (callStatus) => {
2560
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_max_pool_size(
2561
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(this),
2562
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
2563
+ callStatus);
2564
+ },
2565
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2566
+ ));
2567
+ }
2568
+
2569
+ minPoolSize(value: number): WarmPoolAutoscalingBuilderLike {
2570
+ return FfiConverterTypeWarmPoolAutoscalingBuilder.lift(uniffiCaller.rustCall(
2571
+ /*caller:*/ (callStatus) => {
2572
+ return nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_method_warmpoolautoscalingbuilder_min_pool_size(
2573
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.clonePointer(this),
2574
+ FfiConverterUInt32.lower(value, nativeModule().rustbuffer_alloc),
2575
+ callStatus);
2576
+ },
2577
+ /*liftString:*/ FfiConverterString.lift.bind(FfiConverterString),
2578
+ ));
2579
+ }
2580
+
2581
+
2582
+ uniffiDestroy(): void {
2583
+ const ptr = (this as any)[destructorGuardSymbol];
2584
+ if (ptr !== undefined) {
2585
+ const pointer = uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.pointer(this);
2586
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.freePointer(pointer);
2587
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.unbless(ptr);
2588
+ delete (this as any)[destructorGuardSymbol];
2589
+ }
2590
+ }
2591
+
2592
+ static instanceOf(obj_: any): obj_ is WarmPoolAutoscalingBuilder {
2593
+ return uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.isConcreteType(obj_);
2594
+ }
2595
+
2596
+
2597
+ }
2598
+
2599
+ const uniffiTypeWarmPoolAutoscalingBuilderObjectFactory: UniffiObjectFactory<WarmPoolAutoscalingBuilderLike> = (() => {
2600
+
2601
+ /// <reference lib="es2021" />
2602
+ const registry = typeof FinalizationRegistry !== 'undefined' ? new FinalizationRegistry<UniffiHandle>((heldValue: UniffiHandle) => {
2603
+ uniffiTypeWarmPoolAutoscalingBuilderObjectFactory.freePointer(heldValue);
2604
+ }) : null;
2605
+
2606
+ return {
2607
+ create(pointer: UniffiHandle): WarmPoolAutoscalingBuilderLike {
2608
+ const instance = Object.create(WarmPoolAutoscalingBuilder.prototype);
2609
+ instance[pointerLiteralSymbol] = pointer;
2610
+ instance[destructorGuardSymbol] = this.bless(pointer);
2611
+ instance[uniffiTypeNameSymbol] = "WarmPoolAutoscalingBuilder";
2612
+ return instance;
2613
+ },
2614
+
2615
+
2616
+ bless(p: UniffiHandle): UniffiGcObject {
2617
+ const ptr = {
2618
+ p, // make sure this object doesn't get optimized away.
2619
+ markDestroyed: () => undefined,
2620
+ };
2621
+ if (registry) {
2622
+ registry.register(ptr, p, ptr);
2623
+ }
2624
+ return ptr;
2625
+ },
2626
+
2627
+ unbless(ptr_: UniffiGcObject) {
2628
+ if (registry) {
2629
+ registry.unregister(ptr_);
2630
+ }
2631
+ },
2632
+
2633
+ pointer(obj_: WarmPoolAutoscalingBuilderLike): UniffiHandle {
2634
+ if ((obj_ as any)[destructorGuardSymbol] === undefined) {
2635
+ throw new UniffiInternalError.UnexpectedNullPointer();
2636
+ }
2637
+ return (obj_ as any)[pointerLiteralSymbol];
2638
+ },
2639
+
2640
+ clonePointer(obj_: WarmPoolAutoscalingBuilderLike): UniffiHandle {
2641
+ const pointer = this.pointer(obj_);
2642
+ return uniffiCaller.rustCall(
2643
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_clone_warmpoolautoscalingbuilder(pointer, callStatus),
2644
+ /*liftString:*/ FfiConverterString.lift
2645
+ );
2646
+ },
2647
+
2648
+ freePointer(pointer: UniffiHandle): void {
2649
+ uniffiCaller.rustCall(
2650
+ /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_cyclops_sdk_schema_fn_free_warmpoolautoscalingbuilder(pointer, callStatus),
2651
+ /*liftString:*/ FfiConverterString.lift
2652
+ );
2653
+ },
2654
+
2655
+ isConcreteType(obj_: any): obj_ is WarmPoolAutoscalingBuilderLike {
2656
+ return obj_[destructorGuardSymbol] && obj_[uniffiTypeNameSymbol] === "WarmPoolAutoscalingBuilder";
2657
+ },
2658
+ }})();
2659
+ const FfiConverterTypeWarmPoolAutoscalingBuilder = new FfiConverterObject(uniffiTypeWarmPoolAutoscalingBuilderObjectFactory);
2660
+
2661
+ // FfiConverter for string | undefined
2662
+ const FfiConverterOptionalString = new FfiConverterOptional(FfiConverterString);
2663
+
2664
+ // FfiConverter for boolean | undefined
2665
+ const FfiConverterOptionalBoolean = new FfiConverterOptional(FfiConverterBool);
2666
+
2667
+ // FfiConverter for number | undefined
2668
+ const FfiConverterOptionalUInt32 = new FfiConverterOptional(FfiConverterUInt32);
2669
+
2670
+ // FfiConverter for ClaimLifecycle | undefined
2671
+ const FfiConverterOptionalTypeClaimLifecycle = new FfiConverterOptional(FfiConverterTypeClaimLifecycle);
2672
+
2673
+ // FfiConverter for ClaimSecretRef | undefined
2674
+ const FfiConverterOptionalTypeClaimSecretRef = new FfiConverterOptional(FfiConverterTypeClaimSecretRef);
2675
+
2676
+ // FfiConverter for Array<OsGymSandboxClaimCondition>
2677
+ const FfiConverterSequenceTypeOSGymSandboxClaimCondition = new FfiConverterArray(FfiConverterTypeOSGymSandboxClaimCondition);
2678
+
2679
+ // FfiConverter for Array<OsGymSandboxClaimCondition> | undefined
2680
+ const FfiConverterOptionalSequenceTypeOSGymSandboxClaimCondition = new FfiConverterOptional(FfiConverterSequenceTypeOSGymSandboxClaimCondition);
2681
+
2682
+ // FfiConverter for OsGymSandboxClaimSandbox | undefined
2683
+ const FfiConverterOptionalTypeOSGymSandboxClaimSandbox = new FfiConverterOptional(FfiConverterTypeOSGymSandboxClaimSandbox);
2684
+
2685
+ // FfiConverter for Array<string>
2686
+ const FfiConverterSequenceString = new FfiConverterArray(FfiConverterString);
2687
+
2688
+ // FfiConverter for Array<string> | undefined
2689
+ const FfiConverterOptionalSequenceString = new FfiConverterOptional(FfiConverterSequenceString);
2690
+
2691
+ // FfiConverter for RuntimeKind | undefined
2692
+ const FfiConverterOptionalTypeRuntimeKind = new FfiConverterOptional(FfiConverterTypeRuntimeKind);
2693
+
2694
+ // FfiConverter for Map<string, string>
2695
+ const FfiConverterMapStringString = new FfiConverterMap(FfiConverterString, FfiConverterString);
2696
+
2697
+ // FfiConverter for Map<string, string> | undefined
2698
+ const FfiConverterOptionalMapStringString = new FfiConverterOptional(FfiConverterMapStringString);
2699
+
2700
+ // FfiConverter for Array<PreservedJsonLike>
2701
+ const FfiConverterSequenceTypePreservedJson = new FfiConverterArray(FfiConverterTypePreservedJson);
2702
+
2703
+ // FfiConverter for Array<PreservedJsonLike> | undefined
2704
+ const FfiConverterOptionalSequenceTypePreservedJson = new FfiConverterOptional(FfiConverterSequenceTypePreservedJson);
2705
+
2706
+ // FfiConverter for ImagePullPolicy | undefined
2707
+ const FfiConverterOptionalTypeImagePullPolicy = new FfiConverterOptional(FfiConverterTypeImagePullPolicy);
2708
+
2709
+ // FfiConverter for Firmware | undefined
2710
+ const FfiConverterOptionalTypeFirmware = new FfiConverterOptional(FfiConverterTypeFirmware);
2711
+
2712
+ // FfiConverter for PreservedJsonLike | undefined
2713
+ const FfiConverterOptionalTypePreservedJson = new FfiConverterOptional(FfiConverterTypePreservedJson);
2714
+
2715
+ // FfiConverter for ServiceProtocol | undefined
2716
+ const FfiConverterOptionalTypeServiceProtocol = new FfiConverterOptional(FfiConverterTypeServiceProtocol);
2717
+
2718
+ // FfiConverter for Array<SandboxService>
2719
+ const FfiConverterSequenceTypeSandboxService = new FfiConverterArray(FfiConverterTypeSandboxService);
2720
+
2721
+ // FfiConverter for Array<SandboxService> | undefined
2722
+ const FfiConverterOptionalSequenceTypeSandboxService = new FfiConverterOptional(FfiConverterSequenceTypeSandboxService);
2723
+
2724
+ // FfiConverter for OidcConfig | undefined
2725
+ const FfiConverterOptionalTypeOidcConfig = new FfiConverterOptional(FfiConverterTypeOidcConfig);
2726
+
2727
+ // FfiConverter for ProcessMode | undefined
2728
+ const FfiConverterOptionalTypeProcessMode = new FfiConverterOptional(FfiConverterTypeProcessMode);
2729
+
2730
+ // FfiConverter for WarmPoolAutoscaling | undefined
2731
+ const FfiConverterOptionalTypeWarmPoolAutoscaling = new FfiConverterOptional(FfiConverterTypeWarmPoolAutoscaling);
2732
+
2733
+ // FfiConverter for WarmPoolTtlPolicy | undefined
2734
+ const FfiConverterOptionalTypeWarmPoolTtlPolicy = new FfiConverterOptional(FfiConverterTypeWarmPoolTtlPolicy);
2735
+
2736
+
2737
+ /**
2738
+ * This should be called before anything else.
2739
+ *
2740
+ * It is likely that this is being done for you by the library's `index.ts`.
2741
+ *
2742
+ * It checks versions of uniffi between when the Rust scaffolding was generated
2743
+ * and when the bindings were generated.
2744
+ *
2745
+ * It also initializes the machinery to enable Rust to talk back to Javascript.
2746
+ */
2747
+ function uniffiEnsureInitialized() {
2748
+ // Get the bindings contract version from our ComponentInterface
2749
+ const bindingsContractVersion = 30;
2750
+ // Get the scaffolding contract version by calling the into the dylib
2751
+ const scaffoldingContractVersion = nativeModule().ubrn_ffi_cyclops_sdk_schema_uniffi_contract_version();
2752
+ if (bindingsContractVersion !== scaffoldingContractVersion) {
2753
+ throw new UniffiInternalError.ContractVersionMismatch(scaffoldingContractVersion, bindingsContractVersion);
2754
+ }
2755
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxtemplatespecbuilder_new() !== 22071) {
2756
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxtemplatespecbuilder_new");
2757
+ }
2758
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_build() !== 53928) {
2759
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_build");
2760
+ }
2761
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_vm_template() !== 6610) {
2762
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxtemplatespecbuilder_vm_template");
2763
+ }
2764
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new() !== 26063) {
2765
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_osgymsandboxwarmpoolspecbuilder_new");
2766
+ }
2767
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_autoscaling() !== 44912) {
2768
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_autoscaling");
2769
+ }
2770
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_build() !== 5682) {
2771
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_build");
2772
+ }
2773
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_idle_ttl_seconds() !== 56677) {
2774
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_idle_ttl_seconds");
2775
+ }
2776
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_replicas() !== 50438) {
2777
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_replicas");
2778
+ }
2779
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref() !== 7198) {
2780
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_sandbox_template_ref");
2781
+ }
2782
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_ttl_policy() !== 53364) {
2783
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_ttl_policy");
2784
+ }
2785
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_ttl_seconds_after_created() !== 44516) {
2786
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_osgymsandboxwarmpoolspecbuilder_ttl_seconds_after_created");
2787
+ }
2788
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json() !== 24064) {
2789
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_preservedjson_from_json");
2790
+ }
2791
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json() !== 8252) {
2792
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_preservedjson_to_json");
2793
+ }
2794
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new() !== 21082) {
2795
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_sandboxservicebuilder_new");
2796
+ }
2797
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_build() !== 62919) {
2798
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_build");
2799
+ }
2800
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_name() !== 62417) {
2801
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_name");
2802
+ }
2803
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_protocol() !== 10309) {
2804
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_protocol");
2805
+ }
2806
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_target_port() !== 61462) {
2807
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_sandboxservicebuilder_target_port");
2808
+ }
2809
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_sandboxtemplaterefbuilder_new() !== 4748) {
2810
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_sandboxtemplaterefbuilder_new");
2811
+ }
2812
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_build() !== 46569) {
2813
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_build");
2814
+ }
2815
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name() !== 1803) {
2816
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_sandboxtemplaterefbuilder_name");
2817
+ }
2818
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new() !== 27302) {
2819
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_vmtemplatebuilder_new");
2820
+ }
2821
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args() !== 38529) {
2822
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_args");
2823
+ }
2824
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build() !== 17867) {
2825
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_build");
2826
+ }
2827
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_claim_secrets() !== 62567) {
2828
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_claim_secrets");
2829
+ }
2830
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_command() !== 20371) {
2831
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_command");
2832
+ }
2833
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_disk_image() !== 49021) {
2834
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_container_disk_image");
2835
+ }
2836
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores() !== 25645) {
2837
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_cpu_cores");
2838
+ }
2839
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env() !== 48368) {
2840
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_env");
2841
+ }
2842
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware() !== 33926) {
2843
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_firmware");
2844
+ }
2845
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy() !== 41828) {
2846
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_policy");
2847
+ }
2848
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_secret() !== 40154) {
2849
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_image_pull_secret");
2850
+ }
2851
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_memory() !== 55615) {
2852
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_memory");
2853
+ }
2854
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_nested_virtualization() !== 23834) {
2855
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_nested_virtualization");
2856
+ }
2857
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_node_selector() !== 45280) {
2858
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_node_selector");
2859
+ }
2860
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc() !== 27280) {
2861
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_oidc");
2862
+ }
2863
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes() !== 40623) {
2864
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_probes");
2865
+ }
2866
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode() !== 49070) {
2867
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_process_mode");
2868
+ }
2869
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime() !== 63375) {
2870
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime");
2871
+ }
2872
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name() !== 25466) {
2873
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_runtime_class_name");
2874
+ }
2875
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services() !== 14113) {
2876
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_services");
2877
+ }
2878
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_tolerations() !== 1632) {
2879
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_vmtemplatebuilder_tolerations");
2880
+ }
2881
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new() !== 25769) {
2882
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_constructor_warmpoolautoscalingbuilder_new");
2883
+ }
2884
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build() !== 17132) {
2885
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_build");
2886
+ }
2887
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size() !== 56913) {
2888
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_initial_pool_size");
2889
+ }
2890
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size() !== 18359) {
2891
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_max_pool_size");
2892
+ }
2893
+ if (nativeModule().ubrn_uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size() !== 46153) {
2894
+ throw new UniffiInternalError.ApiChecksumMismatch("uniffi_cyclops_sdk_schema_checksum_method_warmpoolautoscalingbuilder_min_pool_size");
2895
+ }
2896
+
2897
+ }
2898
+
2899
+ export default Object.freeze({
2900
+ initialize: uniffiEnsureInitialized,
2901
+ converters: {
2902
+ FfiConverterTypeClaimLifecycle,
2903
+ FfiConverterTypeClaimSecretRef,
2904
+ FfiConverterTypeClaimSpec,
2905
+ FfiConverterTypeFirmware,
2906
+ FfiConverterTypeImagePullPolicy,
2907
+ FfiConverterTypeJsonValueError,
2908
+ FfiConverterTypeOSGymSandboxClaimCondition,
2909
+ FfiConverterTypeOSGymSandboxClaimSandbox,
2910
+ FfiConverterTypeOSGymSandboxClaimStatus,
2911
+ FfiConverterTypeOSGymSandboxSpec,
2912
+ FfiConverterTypeOSGymSandboxStatus,
2913
+ FfiConverterTypeOSGymSandboxTemplateSpec,
2914
+ FfiConverterTypeOSGymSandboxTemplateSpecBuilder,
2915
+ FfiConverterTypeOSGymSandboxWarmPoolSpec,
2916
+ FfiConverterTypeOSGymSandboxWarmPoolSpecBuilder,
2917
+ FfiConverterTypeOSGymSandboxWarmPoolStatus,
2918
+ FfiConverterTypeOidcConfig,
2919
+ FfiConverterTypePreservedJson,
2920
+ FfiConverterTypeProcessMode,
2921
+ FfiConverterTypeRuntimeKind,
2922
+ FfiConverterTypeSandboxService,
2923
+ FfiConverterTypeSandboxServiceBuilder,
2924
+ FfiConverterTypeSandboxTemplateRef,
2925
+ FfiConverterTypeSandboxTemplateRefBuilder,
2926
+ FfiConverterTypeSchemaBuildError,
2927
+ FfiConverterTypeServiceProtocol,
2928
+ FfiConverterTypeVmTemplate,
2929
+ FfiConverterTypeVmTemplateBuilder,
2930
+ FfiConverterTypeWarmPoolAutoscaling,
2931
+ FfiConverterTypeWarmPoolAutoscalingBuilder,
2932
+ FfiConverterTypeWarmPoolTtlPolicy,
2933
+ }
2934
+ });